CPE 101 Chapter 4 Issue: How to create a reusable function that makes a decision "Not So Good" - Procedure (void function) void isEven(int number) { if (number % 2 == 0) { printf("Number is even."); } else { printf("Number is odd."); } } "Better" - boolean function int isEven(int number) { return (number % 2 == 0); } int main(void) { int someNumber = 3; if (isEven(someNumber)) { printf("Number is even."); } else { printf("Number is odd."); } } This solution is more flexible because the decision logic is separate from the printing. Thus isEven() can be reused for different purposes than printing. "Best" - boolean function with enum type /* Logical (boolean) type */ typedef enum { false, true } boolean; boolean isEven(int number) { return (number % 2 == 0); } int main(void) { int someNumber = 3; if (isEven(someNumber)) { printf("Number is even."); } else { printf("Number is odd."); } } This solution improves readability by using a named type "boolean" to represent boolean functions and make them easier to identify and distinguish from functions that return integers.