求两个整数最大公约数,求问那出错了?
/* c4-6.c */#include <math.h>
#include <stdio.h>
int main()
{
unsigned int n, m, t;
printf(\"Please enter two numbers:\");
scanf(\"%d,%d\", &n, &m);
if (n < m)
{
t = n; n = m; m = t;
}
t = n % m;
/************found************/
while (t != 0)
{ n = m;
m = t;
/************found************/
t = n % m;
}
/************found************/
printf(\"max is : %d\", m);
return 0;
}