#include
int ret(int x, int y)
{
int i=0;
if (x % y == 0)
return x;
while (x % y)
{
i = x % y;
x = y;
y = i;
return i;
}
}
int main()
{
int a, b,c,d,m,j, n;
printf(“请输入四个数:”);
scanf_s(服务器托管网“%d,%d,%d,%d”, &a, &b,&c,&d);
int ret(int x, int y);
n = ret(a, b);
printf(“%dn”, n);
m = ret(n, c);
printf(“%dn”,m);
j = ret(m, 服务器托管网d);
printf(“%d,%d,%d,%d的最大公因数为%dn”, a, b,c,d,j);
return 0;
}
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
相关推荐: leetcode – 253. Meeting Rooms II
Description Given an array of meeting time intervals intervals where intervals[i] = [starti, endi], return the minimum number of c…