//欧几里德算法
//Author jeffasd
#include
typedef unsigned int U32;
typedef unsigned char BYTE;
#define FALSE 0
#define TRUE 1
U32 Gcd(U32, U32);
int main()
{
U32 foo;
foo = Gcd(1989, 1590);
printf("THe data is %d\n", foo);
return 0;
}
U32 Gcd(U32 M, U32 N)
{
U32 Rem;
while(N > 0)
{
Rem = M % N;
M = N;
N = Rem;
}
return M;
}
阅读(564) | 评论(0) | 转发(0) |