CSharp - Write program to keep keep throwing until as there is a 6.

Requirements

You will throw a dice and keep throwing until as there is a 6.

Hint

Demo

using System;
class Program//from  ww  w .  j ava 2  s  . c o  m
{
    static void Main(string[] args)
    {
        // Random number generator 
        Random randomNumbers = new Random();

        // Throwing as long as we have six 
        int thrown;
        do
        {
            thrown = randomNumbers.Next(1, 6 + 1);
            Console.WriteLine(thrown);
        } while (thrown == 6);

    }
}

Result