using System;
namespace test
{
/// <summary>
/// 乱数の発生
/// </summary>
class Class1
{
static void Main(string[] args)
{
//
Random ran = new System.Random();
Console.WriteLine("Random.Next()");
for( int i = 0; i < 10; i++)
Console.Write("{1} ", i, ran.Next());
Console.WriteLine("\n\nRandom.Next(100)");
for( int i = 0; i < 10; i++)
Console.Write("{1} ", i, ran.Next(100));
Console.WriteLine("\n\nRandom.Next(-10, 10)");
for( int i = 0; i < 10; i++)
Console.Write("{1} ", i, ran.Next(-10, 10));
}
}
}
|