Pagini recente » Cod sursa (job #511965) | Cod sursa (job #2529095) | Cod sursa (job #1560887) | Cod sursa (job #510453) | Cod sursa (job #2390219)
package com.company;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = null;
try {
sc = new Scanner(new FileInputStream("input.txt"));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
PrintStream printer = null;
try {
printer = new PrintStream("output.txt");
} catch (FileNotFoundException e) {
e.printStackTrace();
}
assert sc != null;
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
assert printer != null;
printer.println(a+b);
printer.flush();
}
}