Zadatak9-15

#include <iostream>

using namespace std;

int main()
{
int a,b,i,dj;
cin>>a;
cin>>b;
if(a>b) swap (a,b);
for(i=1; i<=a; i++)
{ if((a%i==0)&&(b%i==0))
dj=i;}
cout<<dj<<endl;
return 0;
}

Advertisements