Cod sursa(job #418692)

Utilizator k_killerSzabo Krisztian k_killer Data 16 martie 2010 11:37:58
Problema A+B Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.32 kb
#include <fstream>
#include <iostream>
using namespace std;

int main(){
	const int max=10;
	int a,b;
	char c;
	char* pc=&c;
	ifstream fin;
	ofstream fout;
	fin.open("adunare.in");
	fin.getline(pc, max);
	a = atoi(pc);
	fin.getline(pc, max);
	b = atoi(pc);
	fout.open("adunare.out");
	fout << a+b;
	return 0;
}