Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Java by lindseyhausmann ( 5 years ago )
**
 * This program prints the song 99 bottles. 
 *
 * @lindseyhausmann
 * @4-6-21
 */
import java.util.Scanner;
public class Bottles
{
    public static void main(String [] args)
    {
        Scanner in = new Scanner(System.in);
        System.out.println("Welcome to the song printer! Please enter and get ready to sing!"); 
        String prompt = in.nextLine();
        for(int i = 99; i > 0 ; i--) 
        {
            // lyrics to the song
            System.out.println( i + " bottles of root beeer on the wall, " + i + " bottles of root beer."); 
            System.out.println("Take one down pass it around, " + (i - 1) + " bottles of root beer on the wall."); 
        }
    }
}

 

Revise this Paste

Your Name: Code Language: