Pagini recente » Cod sursa (job #3312037) | Monitorul de evaluare | Cod sursa (job #3311820) | Cod sursa (job #1768837) | Cod sursa (job #1430494)
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.txt");
sc = new Scanner(file);
int x = sc.nextInt();
int y = sc.nextInt();
long z = x + y;
sc.close();
FileWriter fw = new FileWriter(new File("adunare.out"));
fw.write(Long.toString(z));
fw.close();
}
}