Cod sursa(job #2188383)
Utilizator | Data | 27 martie 2018 09:24:48 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | bpc9 | Marime | 0.25 kb |
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
int a, b;
ifstream f("cmmdc.in");
ofstream g("cmmdc.out");
f>>a>>b;
while(a!=b)
{
if(a>b)
a=a-b;
else
b=b-a;
}
g<<a;
}