1 #include <stdio.h> 2 int main(int argc, char *argv[]) 3 { 4 int a,b,c; 5 scanf("%d %d",&a,&b); 6 while(b>0) 7 { 8 c=a%b; 9 a=b; 10 b=c; 11 } 12 printf("%d\n",a); 13 return 0; 14 }