Ejemplo n.º 1
0
 static void Main(string[] args)
 {
     const int n = 1000000;
     const int maxValue = 100;
     var random = new Random();
     var table = new int[n];
     var check = new TableTasks();
     for(int i = 0; i < n; ++i) {
         table[i] = random.Next(maxValue);
     }
     Console.WriteLine("\nSum of table values: {0}",check.sumOfTableValues(n,table));
     Console.ReadKey();
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            const int n        = 1000000;
            const int maxValue = 100;
            var       random   = new Random();
            var       table    = new int[n];
            var       check    = new TableTasks();

            for (int i = 0; i < n; ++i)
            {
                table[i] = random.Next(maxValue);
            }
            Console.WriteLine("\nSum of table values: {0}", check.sumOfTableValues(n, table));
            Console.ReadKey();
        }