Advertisement
Fhernd

minimos-maximos-por-indice-secuencias.cs

Feb 23rd, 2018
1,052
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1. List<int> secuencia1 = new List<int>(){3, 7, 11, 13, 19};
  2. List<int> secuencia2 = new List<int>(){2, 5, 3, 17, 11};
  3.  
  4. // Valores mínimos:
  5. secuencia1.Zip(secuencia2, (valorSecuencia1, valorSecuencia2) =>
  6.     Math.Min(valorSecuencia1, valorSecuencia2)
  7. ).Dump("Valores Máximos");
  8.  
  9. // Valores máximos:
  10. secuencia1.Zip(secuencia2, (valorSecuencia1, valorSecuencia2) =>
  11.     Math.Max(valorSecuencia1, valorSecuencia2)
  12. ).Dump("Valores Máximos");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement