using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace random { class radomexercise { static void Main(string[] args) { int[] a = {0, 0, 0, 0, 0, 0}; int x = 'z' - 'a'; int[] c = new int['z' - 'a' + 1]; char read; c[read - 'a'] = 0; Random rand = new Random(); int num; for (int i = 0; i < 6000; i++) { num = rand.Next(1, 7); a[num - 1] += 1; } for (int j = 0; j < a.Length; j++) { Console.WriteLine("Number of occurrences of {0} = {1}", j+1, a[j]); } } } }