Run ❯
Get your
own C#
server
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
using System; using System.Collections.Generic; using System.Linq; namespace MyApplication { class Program { static void Main(string[] args) { List
scores = new List
{ 45, 80, 62, 30, 95 }; Console.WriteLine(scores.Count(s => s >= 50)); // 3 Console.WriteLine(scores.Sum()); // 312 Console.WriteLine(scores.Average()); // 62.4 Console.WriteLine(scores.Min()); // 30 Console.WriteLine(scores.Max()); // 95 Console.WriteLine(scores.First(s => s >= 50)); // 80 } } }
3
312
62.4
30
95
80