Cod sursa(job #2647880)
Utilizator | Data | 7 septembrie 2020 00:34:42 | |
---|---|---|---|
Problema | Algoritmul lui Euclid | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.22 kb |
#include <iostream>
int main()
{
int n , m;
std :: cin >> n >> m;
while(m != 0)
{
int r = n % m;
n = m;
m = r;
}
std :: cout << n << std :: endl;
return 0;
}`