Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Prime {
- public static void main(String args[]) {
- int x=1, y=2;
- for(x=1; x<=100; x++) {
- for(y=2; y<=9; y++) {
- if(x%y == 0 && x!=y) break;
- }
- if(x%y != 0) System.out.println(x);
- y = 2;
- }
- }
- }
Add Comment
Please, Sign In to add comment