Pagini recente » Cod sursa (job #1252350) | Cod sursa (job #497667) | Cod sursa (job #1248811) | Cod sursa (job #1339654) | Cod sursa (job #2390217)
package com.company;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.nio.file.Files;
import java.nio.file.Paths;
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);
}
}