#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int gcd(int,int);
int main(void) {
int result;
result=gcd(150,35);
printf("The gcd of 150 and 35 is %i\n",result);
result=gcd(1026,405);
print("The gcd of 1026 and 405 is %i\n",result);
printf("The gcd of 83 and 240 is %i\n",gcd(83,240));
system("PAUSE");
return 0;
}
int gcd(int u,int v)
{
int temp;
while(v!=0)
{
temp=u%v;
u=v;
v=temp;
}
return u;
}
初步学习,用Dev-C++ 编译运行就出现E:\C\collect2.exe [Error] ld returned 1 exit status
求大神解答