Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String[] args) {
- int sum1 = 0;
- int second;
- BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
- try {
- while (true) {
- String line = r.readLine();
- if (line.isEmpty())break;
- second = Integer.parseInt(line);
- sum1 += second;
- }
- } catch (Exception ignored) {
- }
- System.out.println(sum1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment