blob: b2b08a8c4677f968e6a4f2762f03ad165761353f (
plain) (
tree)
|
|
#include <IO/IOStream.h>
bool is_prime(int i) {
for (int j = 2; j*j <= i; j++) {
if (i % j == 0) return false;
}
return true;
}
int Main(char** args) {
for (int i = 2; i < 1000000; i++) {
if (is_prime(i)) stdio.printf("%d\t", i);
}
stdio.printf("\nThat's all prime numbers for today.\n");
return 0;
}
|