Final answer:
To solve this problem, you need to write two functions: isEven() and isPrime(). In the main function, you can use a loop to iterate through the numbers 1 to 20 and call the isEven() and isPrime() functions.
Step-by-step explanation:
To solve this problem, you need to write two functions: isEven() and isPrime(). The isEven() function takes an integer as input and returns true if the number is even and false otherwise. The isPrime() function determines if a number is prime or composite using a loop and returns true if the number is prime and false otherwise.
In the main function, you can use a loop to iterate through the numbers 1 to 20. For each number, you can call the isEven() and isPrime() functions to determine if it is even or odd and prime or composite. Finally, you can print the number along with the corresponding information.