Pagini recente » Cod sursa (job #914553) | Cod sursa (job #2662303) | Cod sursa (job #1430524)
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner reader = new Scanner(new FileInputStream("adunare.in"));
int a = reader.nextInt();
int b = reader.nextInt();
int sum = a + b;
PrintWriter writer = new PrintWriter(new FileOutputStream("adunare.out"));
writer.write(String.valueOf(sum) + "\n");
writer.close();
reader.close();
}
}