using System ;

using System.Collections.Generic ;

using System.Linq ;

using System.Text ;

namespace FirstDice

{

class Program

{

static void Main ( )

{

uint choice = 0 ;

int min = 1 ;

int max = 7 ;

while ( choice < min || choice > max )

{

//instruction

Console . Write ( "Enter the number of dice to roll: " ) ;

//get some input from the user

string line = Console . ReadLine ( ) ;

//check the input

if ( uint . TryParse ( line, out choice ) )

{

//its a number, but is it in range?

if ( choice > max ) Console . WriteLine ( "Number too high." ) ;

if ( choice < min ) Console . WriteLine ( "Number too low." ) ;

}

else

{

//nope not a number

Console . WriteLine ( " \' {0} \' is not a number between {1} and {2}." , line, min, max ) ;

}

}

Console . WriteLine ( choice + " was a good choice." ) ;

}

}