I've checked the program execution on Eclipse and it works perfectly.
wherein have I done wrong?
TY
package com.codegym.task.task04.task0442;
/*
Adding
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
int sum =0;
while (true) {
int a = Integer.parseInt(buf.readLine());
sum+=a;
if (a==-1) {
System.out.println(sum);
}
}
}
}