|
|
|
|
Write a program that contains 2 functions in addition to main. The first one takes 2 arguments (an int array and an int) and returns nothing. It prints the entire contents of the array argument, one element per line. You MUST use a for loop to print the array contents. The second function takes 1 argument (an int) and returns a bool indicating whether or not the argument was even or odd. Your main function should: +Declare an int array of size 3. +Prompt the user for the contents of each array element. Store each input in the array that you declared in Step 1. The user prompt and assignment statements MUST be inside the body of a for loop. +Call the first function that prints an array, passing it the filled array and the array size. +Repeatedly call (using a for loop) the second function each time passing it a different element in the array until all elements have been passed. Based on the return value of the function, display a message like: " ______ is odd" or "_____ is even" |
|
|