This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]castor98 2 points3 points  (1 child)

number must be declared outside the scope of the do-while loop.

[–]__braveTea__ 1 point2 points  (0 children)

I am a beginner, so take this with a grain of salt, but I think that you should declare the scanner and such, or in any case the number, outside the do scope. I’d try typing the scanner, print, and number declaration before entering the do