Revision: 1292
Updated Code
at September 27, 2006 10:27 by gdonald
Updated Code
#include <iostream> using namespace std; int main() { int i, j; for ( i = 2; i < 100000; i++ ) { for ( j = 2; j <= i/2; j++ ) { if ( ! ( i % j ) ) break; } if ( j > i / 2 ) cout << i << endl; } return 0; }
Revision: 1291
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 27, 2006 10:27 by gdonald
Initial Code
#include <iostream> using namespace std; int main() { int i, j; for ( i = 2; i < 100000; i++ ) { for ( j = 2; j <= i/2; j++ ) { if ( ! ( i % j ) ) break; } if ( j > i / 2 ) cout << i << endl; } return 0; }
Initial URL
Initial Description
Initial Title
C++ prime number generator
Initial Tags
number
Initial Language
C++