Cod sursa(job #1675983)
Utilizator | Data | 5 aprilie 2016 17:51:24 | |
---|---|---|---|
Problema | A+B | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include <ftream>
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();
}
}