Cod sursa(job #505446)
| Utilizator | Data | 2 decembrie 2010 15:29:28 | |
|---|---|---|---|
| Problema | A+B | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.43 kb |
//demonstratie lucru cu fisiere
#include <iostream>
#include <fstream>
using namespace std;
//inceput program
int main()
{
//deschidere fisiere
ifstream fin("adunare.in"); //deschide fis. pt. citire
ofstream fout("adunare.out"); //deschide fis. pt. scriere
int a, b;
//citire date
fin >> a >> b;
//afisare suma
fout << a+b;
//inchidere fisiere
fin.close();
fout.close();
//sf. prg.
return 0;
}