Cod sursa(job #2898926)

Utilizator brazvangRazvan Gheorghe Baciu brazvang Data 7 mai 2022 13:32:50
Problema A+B Scor 100
Compilator c-64 Status done
Runda Arhiva de probleme Marime 0.39 kb
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a, b, s;

    FILE *in_file = fopen("adunare.in", "r");
    FILE *out_file = fopen("adunare.out", "w");

    if(in_file == NULL || out_file == NULL)
    {
        printf("File can t be opened");
        exit (-1);
    }

    fscanf(in_file, "%d%d", &a, &b);
    s=a+b;

    fprintf(out_file,"%d", s);

    return 0;
}