Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main(string[] args)
- {
- string inputString;
- for (int i = 99; i > -1; i--)
- {
- Console.Write("Please enter the verse ");
- inputString = Console.ReadLine();
- if (i == 0)
- {
- Console.WriteLine("No more bottles of beer on the wall, no more bottles of beer.");
- break;
- }
- if (i == 2)
- {
- Console.WriteLine("2 bottles of beer on the wall, 2 bottles of beer.");
- Console.WriteLine("Take one down and pass it around, 1 bottle of beer on the wall.");
- Console.WriteLine();
- }
- if (i == 1)
- {
- Console.WriteLine("1 bottle of beer on the wall, 1 bottle of beer.");
- Console.WriteLine("Take one down and pass it around, 0 bottles of beer on the wall.");
- Console.WriteLine();
- }
- else
- {
- Console.WriteLine("{0} bottles of beer on the wall, {0} bottles of beer.", i);
- Console.WriteLine("Take one down and pass it around, {0} bottles of beer on the wall.", i - 1);
- Console.WriteLine();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment