Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Test2
- {
- class Program
- {
- public static void Main()
- {
- PrintIfPalindrome();
- }
- public static void PrintIfPalindrome()
- {
- string reversedString = string.Empty;
- while (true)
- {
- string inputedString = Console.ReadLine();
- if (inputedString == "END")
- {
- break;
- }
- for (int i = inputedString.Length - 1; i >= 0; i--)
- {
- reversedString += inputedString[i];
- }
- if (reversedString == inputedString)
- {
- Console.WriteLine("true");
- }
- else
- {
- Console.WriteLine("false");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement