RcrdBrt

Untitled

Nov 10th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Es6 {
  3. public static void main(String[] args) {
  4. Scanner kb = new Scanner(System.in);
  5. int num = kb.nextInt();
  6. boolean b = true;
  7. for (int i = 2; i<num && b; i++) {
  8. int k = num%i;
  9. if (k !=0) System.out.println("Il numero e' primo");
  10. else continue;
  11. }
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment