Logic:- What Is Palindrome?
"a word, phrase, or sequence that reads the same backward as forwards"
" Matlab Ulta Seedha Ek Saman " or " मतलब उल्टा सीधा एक समान "
Simple if the string is "MADAM" compare the First letter index of 'M' to the last letter index of 'M' and again compare to 2nd letter index to the second last letter index if both are same then continue for next upcoming letters and repeat the same process continue to repeat if all Word's are same then String Is Palindrome.
Output:
=====================================
Visit - www.nerdutella.com
=====================================
Enter a String: MaDaM
MaDaM==> Is Palindrome
Enter a String:
need an explanation for this answer? contact us directly to get an explanation for this answer