Pagini recente » Cod sursa (job #2710109) | Cod sursa (job #2920731) | Cod sursa (job #389826) | Cod sursa (job #1524619) | Cod sursa (job #1246093)
//============================================================================
// Name : AplusB.cpp
// Author : Boghiu Marius Cristian
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include<stdlib.h>
#include<fstream>
using namespace std;
int main() {
int a,b;
string line;
ifstream myReadFile;
ofstream myWriteFile;
myReadFile.open("adunare.in");
myWriteFile.open("adunare.out");
getline(myReadFile,line) ;
int a = atoi(line.c_str());
getline(myReadFile,line) ;
int b = atoi(line.c_str());
myWriteFile<< a+b;
myWriteFile.close();
myReadFile.close();
return 0;
}