Cod sursa(job #2587091)

Utilizator leeviiTempfli Levente2 leevii Data 21 martie 2020 23:52:27
Problema A+B Scor 100
Compilator java Status done
Runda Arhiva de probleme Marime 0.54 kb

import java.io.*;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws IOException {
        File file = new File("adunare.in");
        Scanner scanner = new Scanner(file);

        int a, b;
        a = scanner.nextInt();
        b = scanner.nextInt();

        scanner.close();

        FileWriter fileWriter = new FileWriter("adunare.out");
        PrintWriter printWriter = new PrintWriter(fileWriter);

        printWriter.print(a + b);

        printWriter.close();
        fileWriter.close();

    }
}