Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Java by Yadu ( 6 years ago )
import java.util.Scanner ;
class Problem19 {
public static void main (String[] args) {
System.out.println("Please enter a number :");
Scanner scanner = new Scanner (System.in);
int n = scanner.nextInt ();
if (n % 1==0 && n % n==0) {
System.out.println(n + " is a prime number ");
}
else {
System.out.println(n + " is not a prime number ");
}
}
}
Revise this Paste