Cod sursa(job #1190540)
Utilizator | Data | 25 mai 2014 14:25:25 | |
---|---|---|---|
Problema | A+B | Scor | 100 |
Compilator | cpp | Status | done |
Runda | itmarathon | Marime | 0.26 kb |
#include<iostream>
#include<fstream>
using namespace std;
int main(void)
{
ifstream numere("adunare.in");
ofstream myfile("adunare.out");
int a,s=0;
while(numere>>a)
{
s+=a;
}
myfile << s;
numere.close();
myfile.close();
return 0;
}