publicclassc3 { publicstaticvoidmain(String[] args) { Scannerprime=newScanner(System.in); inta=0; intn= prime.nextInt(); for (inti=1; n > i; i++) { if (n % i == 0) { ++a; } if (a > 2) break; } if (a == 1) { System.out.printf("%d is prime", n); } else { System.out.printf("%d is not prime", n); } } }