jae-l
5/31/2017 - 2:55 AM

Example of a basic do while loop.

Example of a basic do while loop.

int num = 1;
		
do 
{
  Console.WriteLine("The current value of num is: " + num);
  num++;
} while (num <= 10);

//  The current value of num is: 1
//  The current value of num is: 2
//  The current value of num is: 3
//  The current value of num is: 4
//  The current value of num is: 5
//  The current value of num is: 6
//  The current value of num is: 7
//  The current value of num is: 8
//  The current value of num is: 9
//  The current value of num is: 10