Cod sursa(job #354518)
| Utilizator | Data | 8 octombrie 2009 16:59:18 | |
|---|---|---|---|
| Problema | A+B | Scor | 60 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.34 kb |
#include <fstream>
using namespace std;
int main() {
int a, b, s;
fstream fi("adunare.in", ios::in);
fstream fo("adunare.out", ios::out);
fi >> a >> b; // Valorile variabilelor a si b se citesc din fisier.
s = a + b;
if (s < 10000)
fo << s; // Rezultatul se scrie in fisier.
fo.close();
return 0;
}
