Cod sursa(job #891072)

Utilizator stef_brStefan Puia stef_br Data 25 februarie 2013 13:27:31
Problema Cifra Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.41 kb
#include <iostream>
using namespace std;
#include <fstream>;
int main ()
{
    fstream f1;
    fstream f2;
    int a,b;
    f1.open ("adunare.in", ios::app);
    cin >> a ;
    cin >> b ;
        f1 << a << endl;
        f1 << b << endl;
        f1.close();
        f1.open ("adunare", ios::in);
        f2.open ("adunare.out", ios::app);
        f2<<a+b;
        f1.close();
        f2.close();
}