input "m=" to minput "n=" to nfor i=min(m,n) to 1 step -1 if m%i=0 and n%i=0 exit endifendfor?"这两个数的最大公约数是:",i?"这两个数的最小公倍数是:",m*n/i