Cod sursa(job #1675985)

Utilizator Gigel-FroneGigel Fronel Gigel-Frone Data 5 aprilie 2016 17:51:57
Problema A+B Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.32 kb
#include <fstream>

using namespace std;

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

    int k=0, a, b;
    bool ok;

    f >> a >>b;

    while(k<10)
    {
        if(k%2==0) ok=1;
        else ok=0;
        k++;
        if(ok==1) g << a+b;
        g.close();
    }
}