Skip to main content

Prime Numbers In Range the User Want (C#)

using System;
using System.Collections.Generic;

class Program
{
 
   public void prime(int num)
    {
     
        Boolean isPrime = true;
        Console.WriteLine("the prime number between 1-{0} is: ",num);
        for (int i = 0; i <= num; i++)
        {
            for(int j=2;j<=num;j++)
                if (i != j && i % j == 0)
                {
                    isPrime = false;
                    break;
                }
            if (isPrime == true)

            { Console.WriteLine("{0}", i); }
            isPrime = true;
        }
     
    }
}
class pro
    {

    static void Main()
    {
Console.WriteLine("www.promohack.blogspot.com");
        int num;
        Program obj = new Program();
        string str;
        Console.WriteLine("enter the number till which you want to show the prime number");
            str=Console.ReadLine();
        num=Convert.ToInt16(str);
        obj.prime(num);
     
        Console.ReadLine();
    }
}
Thank You.

Comments

Popular posts from this blog

How To Bypass Surveys By using JavaScript

Every day we  need  to complete the  surveys , to get the needed file.These surveys are very irritative and very rare of them gets ended without giving needed the link, or asks for money,Email,Phone. By  seeing  this i am posting the simple method  method  to bypass these annoying surveys without wasting time and money. 1) First copy the given  java code from this site  http://pastebin.com/MJKzU5zR 2) then Make a Bookmark with name "Bypass_survey" and add url link as the javascript. 3)Now   goto  page that contains the  Survey  and Press that Bookmark. 4)OOhhhh Fre_______.... :o the Survey is Bypassed. Thank you dare to comment

Hack Gmail Password By Phishing Method

Know about  phishing 1. First of all download the Gmail Phisher. Download 2. Extract the rar file now you will get three files as given below:       gmail.html       log.txt       mail.php 3. Upload all the Three files to any of the free Web hosting server. By sining up www.yourfreehosting.net www.esmartstart.com www.110mb.com www.drivehq.com www.t35.com 4.  Once  you have uploaded all the three files to web hosting server now you have to send these to your victim. This is the most important step regarding smart phishing technique. The best hack is Send him mail from  Gmail  Admin such that "We have seen illegal activity from your account and you need to verify your account and your account is  temporarily  disabled after this login. To unlock your account Verify your Email and in that link put your Phish link. 5. Now After sending phisher to victim, once the  user  logs in to his Gmail account using your Phisher, his user ID and password are

Get Maximum Speed From Public WiFi

If you use a public Wi-Fi network in an Internet cafe, school or your wireless network at home, then you are sharing Wifi with other users also, this is what makes your Internet very slow. Do you ever think that you should disable the internet for all other users, and get the maximum speed from your internet connection. To get on a faster wireless public Internet, follow the following steps: Step 1) Open Device Manager from Control Panel>Hardware, or just right click on Computer and from the menu select "Device Manager". Step 2) Now, Scroll to down and expand list of Network adapters and open your your wireless adapter by double clicking on it. Step 3) Now click on the Advanced tab to see all available changes. Step 4) From the property select "Speed ​​& Duplex". Now change it's value from Auto-negotiation to "1.0 Gbps full duplex". Step 5) Now press OK to accept the settings, Now restart your computer. now you ar