Campbell Ritchie wrote:Welcome to JavaRanch
Please use the CODE button; since you are new I have gone back to your post and edited it, so you can see how much better it looks. Please use copy-and-paste rather than a screenshot to show your output. Click the icon on the top left of the command prompt window, then edit, then mark, then use mouse to highlight, then enter key.
I couldn't read the full output, so I copied and executed your code; the output (as you have been told) looks correct to me.
I suggest you don't put your Java work on your desktop. Next time you open a command prompt, give it the following instructions:
mkdir java
cd java
You now have a "java" directory (you can call it anything you like) which will be inside "My Documents" and you can get there easily by typing
cd java
and you can keep all your work there
That looks much better, thank you!
the code runs fine and everything, but the beginning of the output is what i'm getting wrong.
Instead of getting :
99 BOTTLES OF BEER ON THE WALL
99 BOTTLES OF BEER
etc....
I'm getting the output starting from number 60?!!! and the order of the lyrics is kinda messed up at the beginning of the output:
60 bottles of beer
Take one down.
Pass it around.
59 bottles of beer on the wall
59 bottles of beer on the wall
59 bottles of beer
Take one down.
Pass it around.
58 bottles of beer on the wall
58 bottles of beer on the wall
58 bottles of beer
Take one down.
Pass it around.
I hope my way of asking questions is better now,
thank you,