Cod sursa(job #2452225)
Utilizator | Data | 29 august 2019 23:30:04 | |
---|---|---|---|
Problema | A+B | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <iostream>
#include <fstream>
using namespace std;
int main () {
ifstream fin("cmmdc.in");
ofstream fout("cmmdc.out");
int a,b,d,e;
d=a-b;
e=b-a;
fin>>a>>b;
if(a%b==0) {
fout << 0;
}
else
if(a!=b) {
fout<< d;
}
else
if(b!=a)
fout << e;
fin.close();
fout.close();
}