Pagini recente » Cod sursa (job #2376495) | Cod sursa (job #2387666) | Cod sursa (job #1789715) | Cod sursa (job #3129894) | Cod sursa (job #385759)
Cod sursa(job #385759)
// suma.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include<conio.h>
#include<string.h>
int _tmain(int argc, _TCHAR* argv[])
{
int a,b;
char nume1[10],nume2[10];
FILE *f,*g;
printf("dati fisierul de intrare");
gets(nume1);
printf("dati fisierul de iesire");
gets(nume2);
f=fopen(nume1,"rt");
g=fopen(nume2,"wt");
fscanf(f,"%d%d",&a,&b);
fprintf(g,"%d",a+b);
fcloseall();
getch();
return 0;
}