diff options
Diffstat (limited to 'src/user/app/prime/main.cpp')
-rw-r--r-- | src/user/app/prime/main.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/user/app/prime/main.cpp b/src/user/app/prime/main.cpp deleted file mode 100644 index be8780f..0000000 --- a/src/user/app/prime/main.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include <IO/IOStream.h> -#include <String.h> - -bool is_prime(int i) { - for (int j = 2; j*j <= i; j++) { - if (i % j == 0) return false; - } - return true; -} - -int Main(String *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; -} |