Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- string str = Console.ReadLine();
- char [] punkt = {' ', ',' , '.', ';', ':', '?', '!'};
- string[] word = str.Split(punkt);
- int temp = 0;
- for (int i = 0; i < word.Length; i++)
- {
- if (word[i].Length > temp)
- temp = word[i].Length;
- }
- for (int i = 0; i < word.Length; i++)
- {
- if (word[i].Length == temp)
- {
- Console.Write(word[i]);
- Console.Write(" ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement