[Solved] java – can’t break from do-while loop properly


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)
....

solved java – can’t break from do-while loop properly