#include<stdio.h>#include<math.h>int main(){ int num1,num2,temp,n1,n2; scanf("%d %d",&num1,&num2); n1=num1; n2=num2; while(n2!=0) { int rem=n1%n2; n1=n2; n2=rem; } printf("%d\n",n1); return 0;}
No comments