-
-
Save parzibyte/b4839a97df6d9d87febf02655d83e93f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Promedio de valores de un arreglo en C# | |
usando Linq | |
@author parzibyte | |
*/ | |
using System; | |
using System.Linq; | |
class MainClass { | |
public static void Main (string[] args) { | |
double[] calificaciones = {90, 98, 85, 95, 90, 80, 70, 100, 55}; | |
// Simplemente llamamos a Average | |
double promedio = calificaciones.Average(); | |
Console.WriteLine("Promedio: " + promedio); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment