Complete the java code as stated below: import java.util.Scanner;…
Question Answered step-by-step Complete the java code as stated below: import java.util.Scanner;… Complete the java code as stated below:import java.util.Scanner;public class gcd{ //————————————————————————————— // Find the greatest common divisor of two positive integers given by the user. Example: gcd(12,8) = 4 // The greatest common divisor of two integers M and N is another integer P such that: // a. P divides M and N and // b. If there are other divisors for M and N then P is greater than all of them //————————————————————————————— public static void main (String[] args) { int num1, num2, gcd; Scanner scan = new Scanner (System.in); System.out.println (“Enter two integers: “); Computer Science Engineering & Technology Java Programming CST 4401 Share QuestionEmailCopy link Comments (0)


