:P calculate the remainder by hand (not completely sure how numerically stable this is, but in theory it works)
Scanner input = new Scanner(System.in);
System.out.print("Enter a number: ");...
Type: Posts; User: helloworld922
:P calculate the remainder by hand (not completely sure how numerically stable this is, but in theory it works)
Scanner input = new Scanner(System.in);
System.out.print("Enter a number: ");...
Have you heard of the mod operator, as well as the parseInt method? Scanner also has a nextInt methd.
Scanner input = new Scanner(System.in);
System.out.print("Enter a number: ");
int num =...