Cod sursa(job #362865)

Utilizator bcodrinBurla Codrin Alexandru bcodrin Data 11 noiembrie 2009 10:47:35
Problema A+B Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.44 kb
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
using namespace std;

int main() 
{
	
	string p,q;
    fstream myfile;
	myfile.open ("adunare.in");
    getline (myfile,p);
	getline (myfile,q);
	myfile.close();
	int a;
    stringstream ss(p);
	ss >> a;
	int b;
    stringstream pp(q);
	pp >> b;
	signed int s;
	s=a+b;
	ofstream write;
	write.open ("adunare.out");
	write<< s ;
	write.close();
	return 0;
}