home *** CD-ROM | disk | FTP | other *** search
/ C# & Game Programming - A…er's Guide (2nd Edition) / Buono 2nd Ed.iso / Chapter2 / 2.18 / 2.18.cs next >
Encoding:
Text File  |  2004-08-31  |  467 b   |  18 lines

  1. /* A do-while loop II. */
  2. using System;
  3.  
  4. namespace Chapter2 {
  5.     class Class1 {
  6.         static void Main() {
  7.             string Quit;  
  8.                      
  9.             do { // do-while loop
  10.                 Console.WriteLine("\n Would you like to end this loop? "); 
  11.                 Quit = Console.ReadLine(); // users input
  12.             } while (Quit != "yes"); 
  13.             
  14.             Console.WriteLine("Program complete!\n");
  15.         }
  16.     }
  17. }
  18.