Aggregates sum

CSharp · Console

/Program.cs

using System;
using System.Linq;
					
public class Program
{
	public static void Main()
	{
		var scores = new[] { 87, 56, 33, 20, 11, -10, -50 };


		int totalScores = scores.Sum();
		
		Console.WriteLine(totalScores);
	}
}
;