Cod sursa(job #2222274)

Utilizator RazvanMoloRazvan Musteata RazvanMolo Data 16 iulie 2018 19:29:25
Problema A+B Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.24 kb
#include <iostream>
#include <fstream>
using namespace std;

ifstream f("adunare.in.txt");
ofstream g("adunare.out.txt");

int main()
{
    int sum=0,a;
    while(f>>a)
    {
        sum=sum+a;
    }

    g<<sum;
    return 0;
}