An automated pair of dice : Random : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Random »

 

An automated pair of dice









    

/*
C#: The Complete Reference 
by Herbert Schildt 

Publisher: Osborne/McGraw-Hill (March 8, 2002)
ISBN: 0072134852
*/

// An automated pair of dice. 
  
using System;  
  
public class RandDice {     
  public static void Main() {     
    Random ran = new Random(); 
 
    Console.Write(ran.Next(1, 7) + " ");  
    Console.WriteLine(ran.Next(1, 7));  
  }     
}


           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Random