Pagini recente » Cod sursa (job #1846042) | Cod sursa (job #2858920) | Cod sursa (job #1692142) | Cod sursa (job #2924059) | Cod sursa (job #2061242)
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();
}
}
}