.NET Fiddle

CSharp · Console

/Program.cs

using System;

public class Program
{
	public static void Main()
	{
		int[] r = new int[1000];
		var random = new Random();
		for (int x = 0; x < 100000; x++)
		{
			double myRandom = random.NextDouble();
			if ((int)(myRandom * 10) > 4)
			{
				double myRandomWithZero = random.NextDouble();
				r[(int)(myRandom * 100)]++;
			}
			else
			{
				double myRandomWitOne = 1 - random.NextDouble();
				r[(int)(myRandom * 100)]++;
			}
		}

		for (int x = 0; x < 100; x++)
		{
			Console.WriteLine(r[x]);
		}
	}
// Define other methods and classes here
}
;