#include<iostream>
using namespace std;
int main()
{
int a,b,c,min;
cout<<"a="; cin>>a;
cout<<"b="; cin>>b;
cout<<"c="; cin>>c;
while(a!=b || a!=c || b!=c)
{
min=a;
if(b<min) min=b;
if(c<min) min=c;
if(a!=min) a=a-min;
if(b!=min) b=b-min;
if(c!=min) c=c-min;
}
cout<<a;
return 0;
}
|