#include "stdio.h" void main() { int p,r,n,m,temp; scanf("%d,%d,",&n,&m); if(n<m) { temp=n; n=m; m=temp; } p=n*m; while(m!=0) { r=n%m; n=m; m=r; } printf("它们的最大公约数为:%d\n",n); printf("它们的最小公倍数为:%d\n",p/n); }
总结:路遥知马力,犀利。
1 程序太短
2 格式没有缩进