Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace P9._PalindromeIntegers
- {
- internal class Program
- {
- static string reverseString (string input)
- {
- char[] charArray = input.ToCharArray ();
- Array.Reverse (charArray);
- return new string (charArray);
- }
- static void Main(string[] args)
- {
- string input =Console.ReadLine();
- while (input != "END")
- {
- if (reverseString(input) == input)
- {
- Console.WriteLine("true");
- }
- else
- {
- Console.WriteLine("false");
- }
- input = Console.ReadLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement