import javax.swing.*;
public class asdf
{
public static int gcd(int a,int b)
{
int r=a%b;
if (r==0) return b;
return gcd(b,r);
}
public static void main(String args[])
{
String s=JOptionPane.showInputDialog("输入一个整数:");
int n=Integer.parseInt(s);
String s1=JOptionPane.showInputDialog("请再输入一个整数");
int n1=Integer.parseInt(s1);
int n2=gcd (n,n1);
String output=s+"和"+s1+" 最大公约数为"+n2;
JOptionPane.showMessageDialog(null,output,"标题:乘幂",JOptionPane.PLAIN_MESSAGE);
System.exit(0);
}
}