Cod sursa(job #2284232)
Utilizator | Data | 17 noiembrie 2018 00:11:36 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Scor | 0 |
Compilator | c-32 | Status | done |
Runda | Arhiva educationala | Marime | 0.19 kb |
#include <iostream>
using namespace std;
int main()
{
int n , m,r;
cin>>n>>m;
while(m != 0)
{
int r = n % m;
n = m;
m = r;
}
cout<<n;
cout.flush();
return 0;
}