Pagini recente » Cod sursa (job #2091012) | Cod sursa (job #690739) | Cod sursa (job #1483799) | Cod sursa (job #1952526) | Cod sursa (job #2061241)
package infoarena;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws FileNotFoundException {
Scanner sc = new Scanner(new FileInputStream("adunare.in"));
FileOutputStream fos = new FileOutputStream("adunare.out");
int a = sc.nextInt();
int b = sc.nextInt();
try {
fos.write(a+b);
sc.close();
fos.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}