Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Es6 {
- public static void main(String[] args) {
- Scanner kb = new Scanner(System.in);
- int num = kb.nextInt();
- boolean b = true;
- for (int i = 2; i<num && b; i++) {
- int k = num%i;
- if (k !=0) System.out.println("Il numero e' primo");
- else continue;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment