Cod sursa(job #1379962)

Utilizator OrolesVultur Oroles Data 6 martie 2015 20:42:25
Problema A+B Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.4 kb
#include <iostream>
#include <fstream>
#include <stdlib.h>

int main( int argc, char* argv[] )
{
	std::ifstream file("adunare.in");
	std::string firstLine;
	std::string secondLine;
	file >> firstLine >> secondLine;
	file.close();
	int first = atoi(firstLine.c_str());
	int second = atoi( secondLine.c_str());
	std::ofstream fileOut("adunare.out");
	fileOut << first+second;
	fileOut.close();
	return 0;
}