Cod sursa(job #1430603)

Utilizator vlad_cristian.nicolaNicola Vlad Cristian vlad_cristian.nicola Data 8 mai 2015 17:35:32
Problema A+B Scor 0
Compilator java Status done
Runda Arhiva de probleme Marime 0.89 kb
/*
 * 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.
 */
package adunare;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Scanner;
/**
 *
 * @author Vlad Nicola
 */
public class Adunare {

    
    public static void main(String[] args) throws FileNotFoundException, IOException {
        // TODO code application logic here
        Scanner scanner = new Scanner(new File ("adunare.in"));
        Writer wr = new FileWriter("adunare.out");
        int b;
        int a = scanner.nextInt();
        b = scanner.nextInt();
        int c = a + b;
        wr.write(String.valueOf(c));
        wr.close();
        scanner.close();
       
    }
    
}