Cod sursa(job #1430956)
Utilizator | Data | 8 mai 2015 22:21:48 | |
---|---|---|---|
Problema | A+B | Scor | 100 |
Compilator | java | Status | done |
Runda | Arhiva de probleme | Marime | 0.47 kb |
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
int a, b, suma;
Scanner s = new Scanner(new FileInputStream("adunare.in"));
a = s.nextInt();
b = s.nextInt();
s.close();
suma = a + b;
PrintWriter pw = new PrintWriter("adunare.out");
pw.write(String.valueOf(suma));
pw.close();
}
}