using System; namespace miscTest { /// /// Summary description for Class1. /// using System; namespace ConsoleApplication4 { class Race { [STAThread] static void Main(string[] args) { const int runners = 5 ; const int laps = 10; int[,] times; times = new int[runners,laps]; Random generator = new Random() ; for (int runner = 0 ; runner < 5 ; runner++ ) { int ttl = 0; for (int lap = 0 ; lap < 10 ; lap++ ) { times[runner,lap] = generator.Next(1,9); Console.WriteLine ("During Lap {0}, runner {1} ran the lap in {2} minutes", lap+1, runner+1, times[runner,lap]) ; ttl += times[runner,lap]; } Console.WriteLine("\n ==> Runner {0} averaged {1:F2}. <== \n\n", runner+1, (float) ttl/laps); } Console.ReadLine(); } } } }