Lazarus19

Untitled

Mar 29th, 2021
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4. namespace werf
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             int n = int.Parse(Console.ReadLine());      
  11.             List<int> devi = new List<int>();
  12.  
  13.             for (int i = 0; i < n; i++)
  14.             {
  15.                 int pp = int.Parse(Console.ReadLine());
  16.                 devi.Add(pp);
  17.             }
  18.             Console.WriteLine($"min={devi.Min():F2}\nmax={devi.Max():F2}\nsum={devi.Sum():F2}\navg={devi.Average():F2}");
  19.      
  20.         }
  21.     }
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment