Check palindrome

4.7

3 votes
Medium
Problem

Write a program which has a string input and checks whether it is a palindrome or not. (Hint: First find the length of the string)

Format for Input:

string

Format for output:

Y-if-a-palindrome N-if-not-a-palindrome Constraints: The string would have a maximum of 200 characters.

Time Limit: 5
Memory Limit: 256
Source Limit:
Explanation

BAB is the entered string As it is a palindrome, so Y is printed

Editor Image

?