Cod sursa(job #501327)
| Utilizator | Data | 14 noiembrie 2010 18:58:21 | |
|---|---|---|---|
| Problema | A+B | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.42 kb |
// probe.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include<iostream>
using namespace std;
#include<stdio.h>
FILE *f,*g;
int a,b;
int main()
{
if((f=fopen("adunare.in","r"))==NULL)
{printf("Eroare deschidere fisier");return 0;}
if((g=fopen("adunare.out","w"))==NULL)
{printf("Eroare deschidere fisier");return 0;}
fscanf(f,"%d%d",&a,&b);
a+=b;
fprintf(g,"%d",a);
return 0;
}