Pagini recente » Cod sursa (job #1878613) | Cod sursa (job #1806123) | Cod sursa (job #1096370) | Cod sursa (job #2030855) | 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) {
}
}
}