static void Main(string[] args) { //Ejercicio 1 Console.WriteLine("EJERCICIO 1:"); int[] vector1 = { 1, 1, 1, 1, 1 }; int[] vector2 = { 1, 2, 3, 4, 5 }; int threadLimit = 10; for (int i = 0; i < threadLimit; i++) { Console.WriteLine("Ejecutandose con {0} hilos:", i); Master master = new Master(vector1, 3); Console.WriteLine(master.ComputeModulus(vector2)); } Console.WriteLine(); //Ejercicio 2 Console.WriteLine("EJERCICIO 2:"); int[] v = { 1, 2, 3, 4, 5, 6, 6, 6, 8, 9 }; Console.WriteLine(ejercicio2(v, 6)); Console.WriteLine(); //Ejercicio 3 Console.WriteLine("EJERCICIO 3:"); int[] v1 = {1,2,3,4,5,6,7,8,9,10}; Console.WriteLine(ejercicio3(v1)); Console.WriteLine(); //Ejercicio 4 Console.WriteLine("EJERCICIO 4:"); Console.WriteLine(ejercicio4(vector1, vector2)); //15 Console.WriteLine(); }
static void Main(string[] args) { int[] vector1 = { 1,1,1,1,1}; int[] vector2 = {1,2,3,4,5}; int threadLimit = 10; for (int i = 0; i < threadLimit; i++) { Console.WriteLine("Ejecutandose con {0} hilos:", i); Master master = new Master(vector1, 3); Console.WriteLine(master.ComputeModulus(vector2)); } }