Problem 2 :
Subscribe Please : click here Subscribe Please : click here
Write a program to check whether a String or Number is Palindrome or Not .
Example : String : "madam" is Palindrome and "mad" is not
Number : 121212 is Palindrome but 123 is not .
Subscribe Please : click here Subscribe Please : click here
Approach :
- Get the number to check for palindrome
- Hold the number in temporary variable
- Reverse the number
- Compare the temporary number with reversed number
- If both numbers are same, print "palindrome number"
- Else print "not palindrome number"
Comments
Post a Comment