Pagini recente » Cod sursa (job #1291686) | Cod sursa (job #672621) | Cod sursa (job #2595600) | Cod sursa (job #358013) | Cod sursa (job #2533217)
import java.io.*;
import java.util.*;
import java.io.FileNotFoundException;
public class adunare {
public static void main(String[] args) throws FileNotFoundException, IOException{
FileInputStream f = new FileInputStream("adunare.in");
InputStreamReader fchar= new InputStreamReader(f);
BufferedReader buf= new BufferedReader(fchar);
int a,b;
a=Integer.parseInt(buf.readLine());
b=Integer.parseInt(buf.readLine());
fchar.close();
FileOutputStream g= new FileOutputStream("adunare.out");
PrintStream gchar = new PrintStream(g);
gchar.println(a+b);
gchar.close();
}
}