搞了半天 我也初学 ~~
#include <stdio.h>void main()
{
int a,b,c,i,x,y;
printf("shu ru liang ge zheng zheng shu\n");
scanf("%d %d",&a,&b);
if (a<0||b<0) {printf("shu ru cuo wu!");getch();exit(0);}
if (a<b) {c=a;a=b;b=c;}
i=1;
while (i!=0)
{
i=a%b;
a=b;x=b;b=i;
}
printf("zui da gong yue shu shi %d",x);
getch();
}