xlang/test/sieve.x
2023-01-07 17:10:03 +01:00

16 lines
241 B
Plaintext

main() : int {
print 2;
for i := 3; i < 100; i =+ 2 {
composite := false;
for j := 3; j < i; j =+ 2 {
if i % j == 0 {
composite = true;
break;
}
}
if not composite {
print i;
}
}
}