Pagini recente » Cod sursa (job #14596) | Cod sursa (job #1481948) | Cod sursa (job #1351754) | Cod sursa (job #2648377) | Cod sursa (job #1420875)
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 Main {
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);
}
}