Skip to content

Instantly share code, notes, and snippets.

@arrbxr
Created February 15, 2018 10:34
Show Gist options
  • Save arrbxr/5df0e6146834ea0b7323ca44575ddde4 to your computer and use it in GitHub Desktop.
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
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