Difference between revisions of "CSharp: Quantidade mínima, máxima e média de caracteres"
From AdonaiMedrado.Pro.Br
(New page: <code lang="csharp"> using System; using System.Collections.Generic; using System.Linq; namespace QuantidadeDeCaracteres { class Program { public static void Main(string[] args) { ...) |
(No difference)
|
Latest revision as of 18:07, 26 May 2009
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)); } } }