#include <stdio.h>
int main () {
int n, i, j, k;
printf ("2 ");
for (i=3,n=2; n<=50; i+=2) {
for (j=3,k=1; j<i-1; j+=2) {
if (i % j 1) {
printf ("%d ", i);
n++;
}
}
printf("\n");
return 0;
}
Chat with our AI personalities
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
2 is the first prime number.
The first prime number after 14 is 17.
The first prime number after 50 is 53.