Monday, July 27, 2009

The Random() function , C#?

what i wanna do is display randomly "PAIRS" of numbers


ex:





1 2 8 2


9 6 6 7


3 7 4 1


8 9 2 4


5 3 5 9

The Random() function , C#?
Here's what I think is correct C#:





Random r = new Random()


Console.Write(r.Next(1,11))





generates a number between 1 and 10. See the link for more details. You'll need to put the r.Next(,) into a loop to generate the pattern you want.
Reply:Hey i dont have the code in C# but this code might help you solving your problem.. you can refer this code to create your own


No comments:

Post a Comment