Problem Description Link
Algorithm:
It is a simple problem . To solve this problem you can follow this technique.
1. to solve this problem just you get a string
2. after getting input you can check each character from string.
if character is alpha numeric then you can put it into another array
and check the character is alpha numeric and capital letter then you you can convert in small letter(Nb: all character small or capital in this logic all character are small).
3. after complete this process you get an array that contain small letter without space or any special symbol or punctuation.
4. then reverse this array
5. finally check that array and reverse array if same print "You won't be eaten!"
if not same then print "Uh oh.."
Algorithm:
It is a simple problem . To solve this problem you can follow this technique.
1. to solve this problem just you get a string
2. after getting input you can check each character from string.
if character is alpha numeric then you can put it into another array
and check the character is alpha numeric and capital letter then you you can convert in small letter(Nb: all character small or capital in this logic all character are small).
3. after complete this process you get an array that contain small letter without space or any special symbol or punctuation.
4. then reverse this array
5. finally check that array and reverse array if same print "You won't be eaten!"
if not same then print "Uh oh.."
No comments:
Post a Comment
Write your comment - Share Knowledge and Experience