import java.util.Scanner;public class Gongyueshu{    public static void main(String [] args)    {        Scanner sca=new Scanner(System.in);        System.out.println("请输入第一个数");        int a=sca.nextInt();        System.out.println("请输入第二个数");        int b=sca.nextInt();        int c;        if(a>b)        {            c=b;        }        else        {            c=a;        }                    for(int d=c;d>=1;d--)        {            if(a%d==0&&b%d==0)            {                System.out.println("最大公倍数是:"+d);                System.out.println("最小公倍数是:"+(a*b/d));                break;            }        }    }}