Shifted and scaled random integers.
using System;
public class RandomIntegers
{
public static void Main( string[] args )
{
Random randomNumbers = new Random();
int face;
for ( int counter = 1; counter <= 20; counter++ )
{
face = randomNumbers.Next( 1, 7 );
Console.Write( "{0} ", face );
if ( counter % 5 == 0 )
Console.WriteLine();
}
}
}
Related examples in the same category