große Ganzzahleingabe in Java
import java.math.BigInteger;
import java.util.*;
public class ScannerNextBigIntegerExample1 {
public static void main(String args[]){
System.out.print("Enter BigInteger Number to check prime: ");;
Scanner in = new Scanner(System.in);
BigInteger n = in.nextBigInteger();
in.close();
System.out.println(n.isProbablePrime(1) ? "prime" : "not prime");
}
}
Deepak jha