Cod sursa(job #1430136)

Utilizator Ifrim_Andreea_Carmen_322CBIfrim Andreea-Carmen Ifrim_Andreea_Carmen_322CB Data 7 mai 2015 22:01:16
Problema A+B Scor 0
Compilator java Status done
Runda Arhiva de probleme Marime 0.84 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 ab;

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

/**
 *
 * @author Andreea
 */
public class AB {

    /**
     * @param args the command line arguments
     * @throws java.io.IOException
     */
  
 
public static void main(String[] args)throws IOException
{
    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();
 
}
}