Guest User

Untitled

a guest
Jan 21st, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.36 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main(string[] args)
  6.     {
  7.         string inputString;
  8.         for (int i = 99; i > -1; i--)
  9.         {
  10.             Console.Write("Please enter the verse ");
  11.             inputString = Console.ReadLine();
  12.  
  13.             if (i == 0)
  14.             {
  15.                 Console.WriteLine("No more bottles of beer on the wall, no more bottles of beer.");
  16.                 break;
  17.             }
  18.             if (i == 2)
  19.             {
  20.                 Console.WriteLine("2 bottles of beer on the wall, 2 bottles of beer.");
  21.                 Console.WriteLine("Take one down and pass it around, 1 bottle of beer on the wall.");
  22.                 Console.WriteLine();
  23.                
  24.             }
  25.             if (i == 1)
  26.             {
  27.                 Console.WriteLine("1 bottle of beer on the wall, 1 bottle of beer.");
  28.                 Console.WriteLine("Take one down and pass it around, 0 bottles of beer on the wall.");
  29.                 Console.WriteLine();
  30.        
  31.             }
  32.             else
  33.             {
  34.                 Console.WriteLine("{0} bottles of beer on the wall, {0} bottles of beer.", i);
  35.                 Console.WriteLine("Take one down and pass it around, {0} bottles of beer on the wall.", i -            1);
  36.                 Console.WriteLine();
  37.                
  38.                  
  39.             }
  40.         }
  41.     }
  42. }
Add Comment
Please, Sign In to add comment