Question
Java program : 99 Bottles of Beer on the Wall (details below) Main function calls Ninety_Nine_Bottles_of_Beer() Function to print the 99 Bottles of Beer song.
Java program : 99 Bottles of Beer on the Wall (details below)
Main function calls Ninety_Nine_Bottles_of_Beer() Function to print the 99 Bottles of Beer song. Assume that your console is a wall where the song will be written once your code compiles and executes. Following output of program is expected as follows:
*************** Program output ***************************
99 bottles of beer on the wall, 99 bottles of beer
take one down, pass it around, 98 bottles of beer on the wall.
98 bottles of beer on the wall, 98 bottles of beer
take one down, pass it around, 97 bottles of beer on the wall.
97 bottles of beer on the wall, 97 bottles of beer
take one down, pass it around, 96 bottles of beer on the wall.
...
2 bottles of beer on the wall, 2 bottles of beer
take one down, pass it around, 1 bottle of beer on the wall.
1 bottle of beer on the wall, 1 bottle of beer
take one down, pass it around, no more bottles of beer on the wall.
*************** End program output ***********************
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started