[ad_1]
You don’t have an input in your while check. you need to have another variable called, saying userInput:
userInput = input.nextDouble();
a += userInput;
}
while(userInput > 0)
....
[ad_2]
solved java – can’t break from do-while loop properly