Cod sursa(job #2556792)
Utilizator | Data | 25 februarie 2020 10:38:37 | |
---|---|---|---|
Problema | ADN | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.27 kb |
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream f("cmmdc.in");
ofstream g("cmmdc.out");
int a, b, rest;
f>>a>>b;
while (b){
rest = a%b;
a=b;
b=rest;
}
g<<a;
return 0;
}