Pagini recente » Cod sursa (job #929002) | Cod sursa (job #1410989) | Cod sursa (job #2711442) | Cod sursa (job #2760628) | Cod sursa (job #11975)
Cod sursa(job #11975)
// Adunare.cpp : Defines the entry point for the console application.
//
#include "stdio.h"
int main(void)
{
int a,b;
FILE *fin, *fout;
if((fin = fopen("adunare.in", "r"))==NULL)
return -1;
if((fout = fopen("adunare.out", "w"))==NULL)
return -1;
fscanf(fin, "%d\n%d", &a, &b);
fprintf(fout, "%d", a+b);
fclose(fin);
fclose(fout);
return 0;
}