Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace _07a_Dictionaries_Lambda_Expressions_LINQ_Lab
- {
- class Dictionaries_Lambda_Expressions_LINQ_Lab
- {
- static void Main(string[] args)
- {
- int count = int.Parse(Console.ReadLine());
- int[] numbers = new int[count];
- for (int i = 0; i < count; i++)
- {
- numbers[i] = int.Parse(Console.ReadLine());
- }
- Console.WriteLine("Sum = " + numbers.Sum());
- Console.WriteLine("Min = " + numbers.Min());
- Console.WriteLine("Max = " + numbers.Max());
- Console.WriteLine("Average = " + numbers.Average());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment