电脑前段时间坏了,直接源码奉上吧
import java.util.Scanner;
public class edc {
public static void main(String[]args);
Scanner sc = new scanner(System.in);
System.out.println("please input the first number!");
int a = sc.nextInt();
System.out.println("please input the second number!");
int b = sc.nextInt();
int c = a % b;
while (c > 0){
a = b;
b = c;
c = a%b;
}
System.out.println("THE GCM :" + b);
}
}