#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
int i,j;
clrscr();
for(i=3;i<=1000;i++)
{
for(j=2;j<=i;j++)
{
if(i%j==0)
break;
}
if(i==j)
cout<<j<<"\t";
}
getch();
}
//try it by apurba sinus
There are several shell programs available for download on the Internet that will generate prime numbers. The best way to find a prime number is through calculation, however.
2,3,5,7,9,11,13,17,19,23,29,31,37,39,41,43,47,49
Prime numbers are numbers that are only divisible by themselves and the number 1. You can write a program to print all prime numbers from 1 to 100 in FoxPro.
I see no reason why they would do that. Prime numbers can be used for encryption, but there are algorithms that can quickly generate a more or less random prime number. No need to pay for the "discovery" of a specific number!
see the program
There are several shell programs available for download on the Internet that will generate prime numbers. The best way to find a prime number is through calculation, however.
First write a program to generate the prime number. After one prime number was generated, divide the big int number by the prime number. If the remainder is zero then quotient is the second prime number ( also it is important to check whether the quotient is prime number or not because sometimes you will get wrong answer). Repeat the process until you get the result.
2,3,5,7,9,11,13,17,19,23,29,31,37,39,41,43,47,49
The answer is vague but correct . Take any prime number and any other number whose combined digit length is 401 and their product will generate a 400 or a 401 digit number.
not sure of the exact syntax but its quite hard to generate them, but you can go through a list of numbers, that could be 0-10000000 say, and check if it is prime by dividing it by all the numbers that are smaller than it
Use Wolfram|Alpha... go to the related link below, Wolfram|Alpha, and type in (is __ (number) prime) and then the program will compute that and tell you if it is prime or composite.
any number that can only be divided by 2 numbers itself and 1
Prime numbers are numbers that are only divisible by themselves and the number 1. You can write a program to print all prime numbers from 1 to 100 in FoxPro.
I see no reason why they would do that. Prime numbers can be used for encryption, but there are algorithms that can quickly generate a more or less random prime number. No need to pay for the "discovery" of a specific number!
A prime number is a number that cannot be generated by multiplying any 2 whole numbers (aside from 1 and itself). For example, 8 is not a prime number because you can get it by multiplying 4X2. 7 on the other hand IS a prime number because there are no whole numbers you can multiply to generate it aside from 1X7.
Write your own prime number program and find out.
see the program