Hello, again, I have another question if your able to help me. I am doing the Stanford 106a class on you tube so I am using acm imports which are outdated apparently but any help none the less would be appreciated.
I am trying to write a program that will type out the song 99 bottles of beer on the wall counting all the way down to 0 where I declare I am drunk. The problem I am having is that when it runs what ever the user inputs as the value they want to start with it wont count backwards it will just use that number however many times it prints out(what ever is declared to start).
I hope that explanation is good enough! Trying to be short sorry if not clear.Here is my code:
public void run() { println("This program will sing the dreaded song 99 bottles of beer on the wall"); println("Feel free to change 99 to what ever you see fit"); int nBottles = readInt("Enter the perfered # of bottles you would like to start with"); println(+nBottles+"bottles of beer on the wall,"); for(int i=nBottles;i>0;i--) { println(+nBottles+"bottles of beer on the wall"); println (+nBottles+"bottles of beer."); println ("you take one down and pass it around."); } println("now I drunk am...oh shit I got my mixed all words up and "); println("I don't undermean what I stand...hiccup");