Skip to content

Commit

Permalink
prime generator is *nix friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
junian committed Feb 18, 2018
1 parent 622ca4a commit 4c3555f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
File renamed without changes.
@@ -1,7 +1,6 @@
//Bilangan Prima Kurang dari 100

#include <stdio.h>
//#include <conio.h>

int main(){
char isPrime;
Expand All @@ -16,6 +15,6 @@ int main(){
}
if (isPrime) printf("%8d", i);
}
//getch();

return 0;
}
Expand Up @@ -2,7 +2,6 @@
//Sieve of Erastothenes

#include <stdio.h>
#include <conio.h>

int main(){
char isPrime[1000]; //gunakan variabel isPrime sebagai penentu kondisi
Expand All @@ -24,6 +23,6 @@ int main(){
isPrime[j] = 0; //coret semua kelipatannya
}
}
getch();

return 0;
}

0 comments on commit 4c3555f

Please sign in to comment.