#include<stdio.h> int zihanshu(int n1,int n2) { int t,a,b; if(n1<n2) { t=n1; n1=n2; n2=t; } a=n1; b=n2; while(b) { t=a%b; a=b; b=t; } return(a); } void main() { printf("%d",zihanshu(8,12)); }