Cod sursa(job #1420874)

Utilizator UPB_MinionsUPB Ciurel Grigore Tiu UPB_Minions Data 19 aprilie 2015 08:45:46
Problema A+B Scor 0
Compilator java Status done
Runda Arhiva de probleme Marime 0.91 kb

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
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 razvan
 */
public class Tester {
    public static void main (String args[]) throws FileNotFoundException {
        int a;
        int b;
        System.setIn(new FileInputStream("adunare.in"));
        Scanner sc = new Scanner(System.in);
        a = sc.nextInt();
        b = sc.nextInt();
        
        int c = a + b;
        
        System.setOut(new PrintStream(new FileOutputStream("adunare.out")));
        System.out.print(c);
        
       
    }
}