Pagini recente » Cod sursa (job #3149067) | Cod sursa (job #3177351) | Cod sursa (job #779573) | Cod sursa (job #1404674) | Cod sursa (job #933578)
Cod sursa(job #933578)
#include <cstdio>
#include <cmath>
#include <iostream>
#include <fstream>
#define LL long long
namespace {
const char* const kFileIn = "adunare.in";
const char* const kFileOut = "adunare.out";
}
LL x;
LL y;
void read_values() {
std::ifstream fin;
fin.open(kFileIn, std::ios::in);
fin >> x;
fin >> y;
fin.close();
}
void write_values() {
std::ofstream fout;
fout.open(kFileOut, std::ios::trunc|std::ios::out);
fout << (LL)(x+y) << std::endl;
fout.close();
}
int main() {
read_values();
write_values();
return 0;
}