CSharp: Quantidade mínima, máxima e média de caracteres

From AdonaiMedrado.Pro.Br
Jump to: navigation, search
using System;
using System.Collections.Generic;
using System.Linq;
 
namespace QuantidadeDeCaracteres
{
	class Program
	{
		public static void Main(string[] args)
		{
			int n = int.Parse(Console.ReadLine());
			List<string> l = new List<string>();
 
			for(int i = 0; i < n; i++)
				l.Add(Console.ReadLine());
 
  	                Console.WriteLine(l.Min(x=>x.Length));
  	                Console.WriteLine(l.Max(x=>x.Length));
  	                Console.WriteLine(l.Average(x=>x.Length));
		}
	}
}