wes d2a2ba9e15 first commit | 4 年 前 | |
---|---|---|
.. | ||
README.md | 4 年 前 | |
code.cpp | 4 年 前 | |
unitTest.cpp | 4 年 前 |
by Helen Yu tags: strings, validation, loops
A palindrome is a word that is identical forward and backwards. mom racecar kayak Given a word, create a function that checks whether it is a palindrome. Examples checkPalindrome("mom") ➞ true checkPalindrome("scary") ➞ false checkPalindrome("reviver") ➞ true checkPalindrome("stressed") ➞ false Notes All test input is lower cased.
A palindrome is a word that is identical forward and backwards.
Given a word, create a function that checks whether it is a palindrome.
checkPalindrome("mom") ➞ true
checkPalindrome("scary") ➞ false
checkPalindrome("reviver") ➞ true
checkPalindrome("stressed") ➞ false
All test input is lower cased.