Write a program that reads a list of integers, and outputs whether the list contains all multiples of 10, no multiples o
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Write a program that reads a list of integers, and outputs whether the list contains all multiples of 10, no multiples o
Write a program that reads a list of integers, and outputs whether the list contains all multiples of 10, no multiples of 10, or mixed values. Define a function named IsVectorMult 10 that takes a vector as a parameter, representing the list, and returns a boolean that represents whether the list contains all multiples of ten. Define a function named IsVectorNoMult 10 that takes a vector as a parameter, representing the list, and returns a boolean that represents whether the list contains no multiples of ten. Then, write a main program that takes an integer, representing the size of the list, followed by the list values. The first integer is not in the list Ex If the input is 5 20 40 60 80 100 the output is all multiples of 10 Ex: If the input is S 11-32 53 -74 95 the output is no multiples of 10 Ex. If the input is: 5 10 25 30 40 55 the output is mixed values The program must define and call the following two functions. IsVectorMult 10 returns true if all integers in the vector are multiples of 10 and false otherwise. IsVectorNoMult10 returns true if no integers in the vector are multiples of 10 and false otherwise bool IsVectorMult10(vector<int> myVec) bool IsVectorNoMult10(vector<int> myVec)