Cod sursa(job #1431264)

Utilizator George_Bogdan.Oprea_323CCGeorgeBogdanOprea323CC George_Bogdan.Oprea_323CC Data 9 mai 2015 09:21:20
Problema A+B Scor 0
Compilator java Status done
Runda Arhiva de probleme Marime 0.77 kb

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Bogdan
 */
public class Main {
    public static void main(String[] args) {

        try {
            Scanner sc = new Scanner (new File ("adunare.in"));
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = a + b;
            FileWriter fw = new FileWriter("adunare.out");
            fw.write(c);
        }
        catch (IOException e) {
                System.out.println("Nu exista fisierul");
        }
    }
}