标签:sam include bsp scanf main head led 程序 ane
5 7
1 35
程序:
#include<stdio.h>
int gys(int a,int b)
{
int t;
while(a%b!=0){
t=a%b;
a=b;
b=t;
}
return b;
}
int gbs(int a,int b)
{
return (a*b)/gys(a,b);
}
int main()
{
int m,n,c,d;
scanf("%d%d",&m,&n);
c=gys(m,n);
d=gbs(m,n);
printf("%d ",c);
printf("%d\n",d);
return 0;
}
标签:sam include bsp scanf main head led 程序 ane
原文地址:http://www.cnblogs.com/zady123/p/6537105.html