#include<stdio.h> int main() { int n,m,temp,p,r; printf(“请输入正整数n,m:”); 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,最小公倍数是%d”,n,p/n); return 0; }