Cod sursa(job #2081595)

Utilizator AntoniaBBiro Antonia AntoniaB Data 4 decembrie 2017 21:02:49
Problema A+B Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.49 kb
#include <iostream>
#include <fstream>

using namespace std;

bool citire(long long &a, long long &b)
{
    ifstream in("adunare.in");
    if(!in.good())
        return false;
    in >> a >> b;
    in.close();
    return true;
}

long long adunare(long long a, long long b)
{
    return a + b;
}

int main()
{
    long long a, b;
    if(!citire(a, b))
        return 1;
    long long s = adunare(a, b);
    ofstream out ("adunare.out");
    out << s;
    out.close();
}