We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
solution for java 8
import java.io.;
import java.util.;
public class Solution {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
Prime ob = new Prime();
int a = scan.nextInt();
int b = scan.nextInt();
int c = scan.nextInt();
int d = scan.nextInt();
int e = scan.nextInt();
ob.checkPrime(a);
ob.checkPrime(a,b);
ob.checkPrime(a,b,c);
ob.checkPrime(a,b,c,d,e);
scan.close();
}
Prime Checker
You are viewing a single comment's thread. Return to all comments →
solution for java 8 import java.io.; import java.util.;
public class Solution {
}