Cod sursa(job #1464684)
| Utilizator | Data | 24 iulie 2015 11:43:35 | |
|---|---|---|---|
| Problema | A+B | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.41 kb |
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
int main(){
int a,b;
string line;
ifstream infile;
ofstream outfile;
infile.open("adunare.in");
outfile.open("adunare.out");
if (infile.is_open()){
getline(infile,line);
stringstream(line) >> a;
getline(infile,line);
stringstream(line) >> b;
outfile << a + b << endl;
infile.close();
outfile.close();
}
return 0;
}
