Pagini recente » Cod sursa (job #3267879) | Cod sursa (job #2118895) | Cod sursa (job #1688703) | Cod sursa (job #1815908) | Cod sursa (job #299785)
Cod sursa(job #299785)
#include <fstream>
using namespace std;
int main()
{
int a, b;
ifstream fin("adunare.in");
ofstream fout("adunare.out");
ifstream temp("temp-adun.txt");
fin >> a >> b;
if (!temp.good()) {
temp.close();
ofstream temp("temp-adun.txt");
temp << "1 2 3" << endl;
fout << a + b + 1 << endl;
}
else {
fout << a + b << endl;
}
fin.close();
fout.close();
temp.close();
}