Pagini recente » Cod sursa (job #619327) | Cod sursa (job #1089894) | Cod sursa (job #2638568) | Cod sursa (job #3340736) | Cod sursa (job #1430485)
package suma;
import java.io.BufferedWriter;
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) throws IOException {
Scanner sc;
File file = new File ("adunare.in");
sc = new Scanner(file);
int x = sc.nextInt();
int y = sc.nextInt();
int z = x + y;
sc.close();
File file2 = new File("adunare.out");
FileWriter fw = new FileWriter(file2.getAbsoluteFile());
BufferedWriter bw = new BufferedWriter(fw);
bw.write(z);
bw.close();
}
}