#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
main()
{
int i,j;
int c;
cout << "prime :";
for (i=2;i<1000000;i++){
for (j=2;j<=i; j++){
if ((i%j)==0)
{
if ((j != i) && (i !=j))
{
c = 0;
break;
}
}
}
if (c) cout << i << ",";
c=1;
}
cout << endl;
}
Recent Posts
Archive Posts
Tags