Pagini recente » Cod sursa (job #1673546) | Cod sursa (job #1990474) | Cod sursa (job #1558925) | Cod sursa (job #2040863) | Cod sursa (job #2442940)
package org.alex.learn;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;
public class Main
{
public static void main( String[] args ) throws Exception
{
FileInputStream fileInputStream = null;
PrintWriter fileOutputPrinter = null;
try {
fileInputStream = new FileInputStream("adunare.in");
fileOutputPrinter = new PrintWriter("adunare.out");
Scanner scanner = new Scanner(fileInputStream);
fileOutputPrinter.println(scanner.nextLong() + scanner.nextLong());
scanner.close();
} finally {
if (fileInputStream != null) {
fileInputStream.close();
}
if (fileOutputPrinter != null) {
fileOutputPrinter.close();
}
}
System.exit(0);
}
}