Cod sursa(job #362871)
| Utilizator | Data | 11 noiembrie 2009 10:56:34 | |
|---|---|---|---|
| Problema | A+B | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.47 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=0;
stringstream ss(p);
ss >> a;
int b=0;
stringstream pp(q);
pp >> b;
signed int s=0;
s=a+b;
if (s<2000000000)
{ofstream write;
write.open ("adunare.out");
write<< s ;
write.close();
}
return 0;
} 