Pagini recente » Cod sursa (job #1916315) | Cod sursa (job #1690837) | Cod sursa (job #267405) | Clasament newcomers_1 | Cod sursa (job #1543894)
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int a = 0;
int b = 0;
File input = new File( "adunare.in");
File output = new File( "adunare.out");
try {
Scanner sc = new Scanner(input);
a = sc.nextInt();
b = sc.nextInt();
sc.close();
} catch (FileNotFoundException e) {
}
try {
FileWriter wr = new FileWriter(output);
wr.write(a+b);
wr.close();
} catch (IOException e) {
}
}
}