Pagini recente » Monitorul de evaluare | Cod sursa (job #2069892) | Cod sursa (job #426531) | Istoria paginii utilizator/taniakallos | Cod sursa (job #1666095)
// A + B
// Read two numbers from the file "adunare.in" and
// save their sum in the file "adunare.out"
#include <fstream>
int main()
{
long int a,b;
//open files
ifstream fileIn("adunare.in");
ofstream fileOut("adunare.out");
// get numbers
fileIn >> a;
fileIn >> b;
// place sum
fileOut<< a + b;
// close files
fileIn.close();
fileOut.close();
return 0;
}