Cod sursa(job #1430054)

Utilizator MarinusAlexandru_324CCMarinus Alexandru MarinusAlexandru_324CC Data 7 mai 2015 20:35:34
Problema A+B Scor 0
Compilator java Status done
Runda Arhiva de probleme Marime 0.7 kb

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.PrintWriter;
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 aL3XaNdRu10
 */
public class Problema throws FileNotFoundException {
    Scanner scanner = new Scanner(new FileInputStream("adunare.in"));
    int a = scanner.nextInt();
    int b = scanner.nextInt();
    int suma = a+b;
    PrintWriter writer = new PrintWriter("adunare.out");
    writer.write(String.valueOf(suma)+"\n");
    writer.close();
    scanner.close();
    
}