Cod sursa(job #3163796)

Utilizator romeo37Romeo Popescu romeo37 Data 1 noiembrie 2023 09:58:02
Problema A+B Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.27 kb
#include <iostream>
#include <fstream>

using namespace std;

int main()
{
    ifstream f("adunare.in");

    int s = 0, nr;
    
    while (f >> nr)
    {   
        s = s + nr;
    }

    ofstream g("adunare.out");

    g << s;

    f.close();
    g.close();

    return 0;
}