Shifted and scaled random integers. : Random : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Random »

 

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();
      } 
   }
} 

           
        
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Random