Skip to content

Instantly share code, notes, and snippets.

@diegobersano
Created May 8, 2016 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diegobersano/8226e7526aca2372b4d45dda6bce2ac7 to your computer and use it in GitHub Desktop.
Save diegobersano/8226e7526aca2372b4d45dda6bce2ac7 to your computer and use it in GitHub Desktop.
static void Main(string[] args)
{
Console.WriteLine(SumarCuadrados(new int[] { }));
Console.WriteLine(SumarCuadrados(new int[] { 1, 2, 3, 4, 5 }));
Console.ReadLine();
}
static int SumarCuadrados(int[] valores)
{
return valores.Sum(x => x * x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment