#include<stdio.h> #include<math.h> int main() { //辗转相除法 int a,b,c,sum=0; scanf("%d %d",&a,&b); while(a%b!=0) { c = a%b; a = b; b = c; } sum = b; printf("%d",sum); return 0; } //更相相减术 int main() { int a,b,c,d=0; ...