Cod sursa(job #1430516)

Utilizator darien94Darien darien94 Data 8 mai 2015 15:58:42
Problema A+B Scor 0
Compilator java Status done
Runda Arhiva de probleme Marime 0.81 kb

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

/*
 * 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.
 */

/**
 *
 * @author Marius
 */
public class adunare {
    static int a, b;
    
    public void parsareFisier(String filename) throws FileNotFoundException{
        Scanner scan = new Scanner(new FileReader(filename));
        a = scan.nextInt();
        b = scan.nextInt();
    }
    
    public static void main(String args) throws IOException{
        parsareFisier("adunare.in");
        FileWriter f = new FileWriter("adunare.out");
        f.write(a+b);
    }
}