Computer Science, asked by arnavpandey21075, 10 months ago

write a menu driven program to accept a number ot to accept any two numbers and print the gcd of them using scanner class​

Answers

Answered by sdyadav7049
1

Answer:

import java.util.Scanner;

class ab

{

public static void main (String arg [])

{

int a,b;

System.out.println("Enter two no.");

a=sc.nextInt();

b=sc.nextInt(); // Bhai gcd matlab kya h

System.out.println(a+b);

}

}

Similar questions