Cod sursa(job #546687)

Utilizator BlocK240Filiuta Corintian BlocK240 Data 5 martie 2011 13:00:55
Problema A+B Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.18 kb
#include <fstream>
using namespace std;

int main() {
  int x,s=0;
  ifstream f("adunare.in");
  ofstream g("adunare.out");
  while (f>>x) {s=s+x;
    }
  g<<s;
  f.close();
  g.close();
}