Cod sursa(job #1666075)

Utilizator iudean.bogdanIudean Bogdan iudean.bogdan Data 27 martie 2016 17:12:55
Problema A+B Scor 0
Compilator c Status done
Runda Arhiva de probleme Marime 0.42 kb
// A + B 
// Read two numbers from the file "adunare.in" and
// save their sum in the file "adunare.out"

#include<fstream.h>

int main()
{
	int a,b,sum;
		//open files
	ifstream fileIn("adunare.in");
	ofstream fileOut("adunare.out");
		// get numbers
	fileIn >> a;
	fileIn >> b;
		// check sum
	sum = a + b;
	if( sum < 2000000)
	{
		fileOut << sum
	}
		// close files
	fileIn.close()
	fileOut.close();
}