//输入两个数求最大公约数#include<stdio.h>intmain(intargc,constchar*argv[]){inta,b,tmp,c,d,y=1;printf("请输入两个数字:\n");scanf("%d%d",&a,&b);if(b>a){tmp=b;b=a;a=tmp;}c=a;d=b;while(y!=0){y=c%d;c=d;d=y;}printf("最大公约数是:%d\n",c);return0;}