2021-03-27 15:33:25 -04:00

29 lines
434 B
C++

/*
* read list of ints
* output whether list contains all even, all odd, or neither.
* input begins with an int indicating the number of ints in the list
*
* input:
* 5 2 4 6 8 10
*
* output:
* all even
*
* input:
* 5 1 -3 5 -7 9
*
* output:
* all odd
*
* input:
* 5 1 2 3 4 5
*
* output:
* not even or odd
*
* Two functions
*
* bool IsVectorEven(vector<int> myVec)
* bool IsVectorOdd(vector<int> myVec)
*/