using System;
public class Program
{
public static void Main()
//Declare a random number class instance:
Random rnd = new Random();
//Declare an integer variable to store our random number:
int iRandomNumber;
/* Now give the new varible a Random value
We give it a maximum value of 5:
*/
iRandomNumber = rnd.Next(5);
//Now output the number to the console:
Console.WriteLine(iRandomNumber);
}