Question: Write a Java program that prompts the user to enter two positive integers and finds their greatest common divisor. Sample Input/Output Enter the first number:
Write a Java program that prompts the user to enter two positive integers and finds their greatest common divisor. Sample Input/Output Enter the first number: 135 Enter the second number: 72 GCD of 135 and 72 is 9
Enter the first number: 35 Enter the second number: 110 GCD of 35 and 105 is 5
java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
