Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Collections.Specialized;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace myloyorrr
- {
- internal class Program
- {
- static bool f(string s)
- {
- bool h = true;
- for (int i = 0, j = s.Length - 1; i < s.Length / 2; i++, j--)
- {
- if (s[i] != s[j])
- {
- h = false;
- break;
- }
- }
- return h;
- }
- static void Main()
- {
- string[] a = Console.ReadLine().Split(' ', ',', '.', ':');
- for (int i = 0; i < a.Length; i++)
- {
- if (f(a[i]))
- {
- Console.Write(a[i] + ' ');
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement