Cod sursa(job #1225233)

Utilizator blackdragonflyTeodor P blackdragonfly Data 1 septembrie 2014 21:03:19
Problema A+B Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.27 kb
#include<iostream>
#include<fstream>
using namespace std;

  ifstream f ("adunare.in");
int suma ()
{int c;
    f>>c;
    if(f.eof()) return 0;
    else return c+suma();
}

int main()
{

    ofstream g ("adunare.out");
    g<<suma();
f.close(); g.close();
}