xlang/test/sieve.x

12 lines
165 B
Plaintext
Raw Normal View History

2023-01-07 08:56:27 +00:00
main() : int {
print 2;
2023-01-07 16:10:03 +00:00
for i := 3; i < 100; i =+ 2 {
for j := 3; j < i; j =+ 2 {
2023-01-07 08:56:27 +00:00
if i % j == 0 {
2023-01-07 16:43:25 +00:00
continue 2;
2023-01-07 08:56:27 +00:00
}
}
2023-01-07 16:43:25 +00:00
print i;
2023-01-07 08:56:27 +00:00
}
}