Pagini recente » Cod sursa (job #1418245) | Cod sursa (job #1555634) | Cod sursa (job #523558) | Cod sursa (job #208911) | Cod sursa (job #166240)
Cod sursa(job #166240)
/* by EXISTENCE ( Morut Razvan - Liceul Teoretic "Vasile Goldis", Arad) */
#include <stdio.h>
FILE *f,*g;
int citeste(long &a, long &b) ;
long rezolva(long a, long b) ;
int scrie(long s) ;
int main()
{long a,b,x;
citeste(a,b) ;
x=rezolva(a,b) ;
scrie(x) ;
return 0 ;
}
long rezolva(long a, long b)
{long s;
s=a+b;
return (s) ;
}
int citeste(long &a, long &b)
{
f=fopen("adunare.in","r") ;
fscanf ( f , "%d\n",&a);
fscanf ( f , "%d",&b);
fclose(f);
return 0 ;
}
int scrie(long s)
{
g=fopen("adunare.out","w") ;
fprintf (g, "%d", s);
fclose(g);
return 0;
}