最小公倍数和最大公约数之积等于这2个数之积。只要求出最大公约数,最小公倍数也就出来了。#includevoidmain(){inta,b,c;intk,t;printf("inputtwonumber:");scanf("%d%d",&k,&t);a=k;b=t;c=a%b;while(c>0){a=b;b=c;c=a%b;}a=k*t/b;printf("最小公倍数为:%d\n",a);}满意请采纳!