Just a few short questions. I'm writing two function definitions, but I'm not quite clear as to what that means. The first one is writing a function definition called even that takes one argument (as an int) and returns a bool value. The fiction returns true if one argument is an even number, otherwise it returns false.
The second is a function for isDigit that takes an argument (as a char) and returns a bool value. It returns true if the argument is a decimal digit, and false if not.
What does it mean by a function definition? How do I go about writing these? Thanks for any help.
You don't need the excessive if/else in this case - for instance, with the first one, you can simply return num % 2 == 0;, and similar for the second.
Your solution to the second one doesn't seem right - floor will convert floats/doubles to integers by chopping off the decimal place. I think you mean to compare if the character is between the character values '0' and '9'.