Pagini recente » Cod sursa (job #2496394) | Cod sursa (job #2755832) | oni2019ziua2 | Cod sursa (job #2691949) | Cod sursa (job #1840993)
package Sum;
import java.io.*;
import java.util.*;
class Main {
public static void main(String[] args) {
File inFile = new File("adunare.in");
File outFile = new File("adunare.out");
try {
FileInputStream inStream = new FileInputStream(inFile);
Scanner scanner = new Scanner(inStream);
int a = scanner.nextInt();
int b = scanner.nextInt();
scanner.close();
inStream.close();
int ans = a + b;
try {
FileOutputStream outStream = new FileOutputStream(outFile);
PrintWriter writer = new PrintWriter(outStream);
writer.println(ans);
writer.close();
outStream.close();
} catch (IOException e) {
}
} catch (IOException e) {
}
}
}