Cod sursa(job #2945207)
| Utilizator | Data | 23 noiembrie 2022 16:37:29 | |
|---|---|---|---|
| Problema | Algoritmul lui Euclid | Scor | 0 |
| Compilator | cpp-32 | Status | done |
| Runda | Arhiva educationala | Marime | 0.2 kb |
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
while(b)
{
int r=a%b;
a=b;
b=r;
}
cout<<a;
return 0;
}