wes d2a2ba9e15 first commit | 4 年之前 | |
---|---|---|
.. | ||
README.md | 4 年之前 | |
code.cpp | 4 年之前 | |
unitTest.cpp | 4 年之前 |
by Helen Yu tags: strings, validation, conditions
Create a function that takes in a word and determines whether or not it is plural. A plural word is one that ends in "s". Examples isPlural("changes") ➞ true isPlural("change") ➞ false isPlural("dudes") ➞ true isPlural("magic") ➞ false Notes Don't forget to return the result. Remember that return true (boolean) is not the same as return "true" (string). T
Create a function that takes in a word and determines whether or not it is plural. A plural word is one that ends in "s".
isPlural("changes") ➞ true
isPlural("change") ➞ false
isPlural("dudes") ➞ true
isPlural("magic") ➞ false
return
the result.true
(boolean) is not the same as return "true"
(string).