devc++
辗转相除法代码出现问题,输入数字无法出结果,请各位看一下
#include <stdio.h>
int main()
{
int x, y, t,a;
scanf("%d", "%d\n", &x, &y);
if (x < y) {
a=x;x = y; y = a;
}
t = x % y
while(t != 0) {
x = y; y = t;
}
printf("%d\n", y);
}
结果
1 1
--------------------------------
Process exited after 4.58 seconds with return value 3221225477
请按任意键继续. . .