Pagini recente » Cod sursa (job #1560564) | Cod sursa (job #2586448) | Cod sursa (job #1149852) | Cod sursa (job #1569567) | Cod sursa (job #2186950)
/*
* 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();
}
}