Created
February 15, 2018 10:34
-
-
Save arrbxr/5df0e6146834ea0b7323ca44575ddde4 to your computer and use it in GitHub Desktop.
prime_number_check_1_to_100_in_java created by arrbxr - https://repl.it/@arrbxr/primenumbercheck1to100injava
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Main { | |
public static void main(String[] args) { | |
for(int i=2; i<100; i++){ | |
int count = 1; | |
for(int j=2; j<i; j++){ | |
if(i%j==0){ | |
count = 0; | |
break; | |
} | |
} | |
if(count == 1) | |
System.out.println(i); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment