Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Drafty
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] source = Console.ReadLine().Split(" ", StringSplitOptions.RemoveEmptyEntries);
- if (source.Length == 1)
- {
- Console.WriteLine(0);
- return;
- }
- if (source.Length == 0)
- {
- Console.WriteLine("Входных данных не обнаружено");
- return;
- }
- int min = source[0].Length, minNom = 0;
- for (int i = 1; i < source.Length; i++)
- {
- if (source[i].Length < min)
- {
- min = source[i].Length;
- minNom = i;
- }
- }
- Console.WriteLine(source[minNom]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment