Cod sursa(job #2070733)
Utilizator | Data | 19 noiembrie 2017 20:59:43 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.21 kb |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b,r;
cin>>a>>b;
r=a%b;
while(r)
{
a=b;
b=r;
r=a%b;
}
cout<<b;
return 0;
}