Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Program
- {
- static int size()
- {
- int totchars = 1;
- char tav = char.parse(Console.Readline());
- while (tav >= 'a' && tav <= 'z' || tav >= 'A' && tav <= 'Z')
- {
- tav = char.parse(Console.Readline());
- totchars++;
- Console.Write(tav);
- }
- return totchars;
- }
- static void Main(string[] args)
- {
- int Rsize, Lowest = int.MaxValue;
- for (int i = 1; i <= 20; i++)
- {
- Rsize = size();
- Lowest = Math.Min(Lowest, Rsize);
- Console.Writeline();
- }
- Console.Writeline("Shortest size was" + Lowest)
- Console.Readline();
- }
- }
- }
Add Comment
Please, Sign In to add comment