2020-05-11
求助:
本人这学期刚刚学习c语言:
最近做实验的时候,有一道题,敲的代码老是出错,可以执行,但是就是不是正确的结果。
哪位大哥给看看呀!
#include<stdio.h>
int hualewohaochangshijian(int a,int b)
{
int t,x;
if(a<b)
{
t=a;
a=b;
b=t;
}
x=a%b;
while(x!=0)
{
a=b;
b=x;
x=a%b;
}
return b;
}
int laoshichucuo(int a,int b)
原创
2020-05-11 18:49:20 ·
76 阅读 ·
0 评论