Cod sursa(job #1213999)
Utilizator | Data | 29 iulie 2014 14:06:01 | |
---|---|---|---|
Problema | A+B | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.27 kb |
#include <fstream>
#include <iostream>
using namespace std;
int main()
{
ifstream f("nr.in");
ofstream g("nr.out");
int a,b=0;
while(!f.eof())
{
f>>a;
b=b+a;
}
f.close();
g<<b;
g.close();
return 0;
}