subject

Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers that follow.

Ex: If the input is:

5 2 4 6 8 10

the output is:

all even

Ex: If the input is:

5 1 3 5 7 9

the output is:

all odd

Ex: If the input is:

5 1 2 3 4 5

the output is:

not even or odd

Your program must define and call the following two functions. IsVectorEven returns true if all integers in the array are even and false otherwise. IsVectorOdd returns true if all integers in the array are odd and false otherwise.
bool IsVectorEven(vector myVec)
bool IsVectorOdd(vector myVec)

#include
#include
using namespace std;

/* Define your function here */

int main() {
/* Type your code here. */

return 0;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
Where can page numbers appear? check all that apply. in the header inside tables in the footer at the bottom of columns at the top of columns
Answers: 1
question
Computers and Technology, 24.06.2019 01:10
Create a program that will take in a single x and y coordinate as the origin. after the input is provided, the output should be all of the coordinates (all 26 coordinates read from the “coordinates.json” file), in order of closest-to-farthest from the origin.
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
You know the right answer?
Write a program that reads a list of integers, and outputs whether the list contains all even number...
Questions
question
Mathematics, 23.08.2019 08:00
question
Mathematics, 23.08.2019 08:00
question
Biology, 23.08.2019 08:00
question
Physics, 23.08.2019 08:00
question
Biology, 23.08.2019 08:10