Pagini recente » Cod sursa (job #393146) | Cod sursa (job #1679786) | Cod sursa (job #1029219) | Cod sursa (job #2631284) | Cod sursa (job #614099)
Cod sursa(job #614099)
// Suma.cpp : Defines the entry point for the console application.
//
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
long long a, b;
long long sum = 0;
FILE *f1, *f2;
f1 = fopen("adunare.in", "r");
f2 = fopen("adunare.out", "w");
if (f1 == NULL || f2 == NULL)
{
return 0;
}
fscanf(f1, "%lld\n%lld", &a, &b);
sum = a + b;
fprintf(f2, "%ld", sum);
fclose(f1);
fclose(f2);
return 0;
}