I can make this code "work" but not verify. The verification says to make sure it calculates everything properly. I have tried many different versions of this task and I am not getting what I am missing. Any help would be appreciated. Thank You.
package com.codegym.task.task04.task0442;
/*
Adding
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());
int sum = 0;
while(sum == 0) { // this line here
int b = Integer.parseInt(reader.readLine());
sum = a + b;
if(a == -1) {
System.out.println(sum); // this line here...??
break;
}
System.out.println(sum);
}
}
}