Cod sursa(job #2186950)

Utilizator vianulegendsTudor Vianu vianulegends Data 26 martie 2018 09:10:40
Problema A+B Scor 0
Compilator java Status done
Runda Arhiva de probleme Marime 0.91 kb
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

/**
 *
 * @author elev
 */
class adunare {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws FileNotFoundException, IOException {
        // TODO code application logic here
        Scanner sc = new Scanner(new File("adunare.in"));
        FileWriter fw = new FileWriter("adunare.out");
        int a = sc.nextInt();
        int b = sc.nextInt();
        fw.write(Integer.toString(a-'0' + b-'0'));
        sc.close();
        fw.close();

    }
    
}