#include<stdio.h> int main () { int m, n, temp,i; printf (" Input m & n:");scanf("%d%d", &m, &n);if (m<n) /*比较大小,使得m中存储大数,n中存储小数*/ temp-m; m=n;n=temp; for(i=m;i>0;i++) 1*从大数开始寻找满足条件的自然数*/ if(i%m==0&&i%n==0) {/*输出满足条件的自然数并结束循环*/ printf ( "The LCw of %d and %d is: %d\n",m, n,i); break; }
标签:满足条件,4.2,公倍数,最小,int,printf,i% From: https://www.cnblogs.com/xuan-2004/p/17435979.html