I'm not sure what it is I should be doing .
I'm getting the correct result but it keeps saying I'm wrong.
package com.codegym.task.task04.task0442;
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int sum = 0;
while (true)
{
int no = Integer.parseInt(reader.readLine());
sum = sum+ no;
System.out.println(sum);
if (no == -1)
break;
}
}
}