Cod sursa(job #1431277)

Utilizator Nicolae_Gabriela_Nicoleta_324CCNicolae Gabriela Nicoleta Nicolae_Gabriela_Nicoleta_324CC Data 9 mai 2015 10:01:29
Problema A+B Scor 0
Compilator java Status done
Runda Arhiva de probleme Marime 0.79 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 test_pa;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 *
 * @author Nicoleta
 */
public class Test_Pa {

    
    public static void main(String[] args) throws FileNotFoundException {
        Scanner reader = new Scanner(new FileInputStream("adunare.in"));
    int a = reader.nextInt();
    int b = reader.nextInt();
    int sum = a + b;
 
    PrintWriter writer = new PrintWriter("adunare.out");
    writer.write(String.valueOf(sum) + "\n");
    writer.close();
    reader.close();
    }
    
}