#include<iostream> #include<stdio.h> using namespace std; int main (){ int m=20; int n=8; int x=m; int y=n; while((x%y)!=0) { int temp=y; y=(x%y); x=temp; } cout<<y; system("pause"); return 0; }
#include<iostream> #include<stdio.h> using namespace std; int main (){ int m=20; int n=8; int x=m; int y=n; while((x%y)!=0) { int temp=y; y=(x%y); x=temp; } cout<<y; system("pause"); return 0; }