You will throw a dice and keep throwing until as there is a 6.
using System; class Program// w ww .jav a 2 s . c om { 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); } }