Question: Make a function, int countTrue ( bool a , bool b , bool c , bool d ) , which reads four true / false
Make a function, int countTruebool a bool b bool c bool d which reads four truefalse values and returns the number of trues. Then, write a program Exercisecpp to test the function to type bool values true or false and display the number of trues. The cin object needs to use "boolalpha" flag to read true as a bool value instead of string value of "true". The following shows two test cases.
Type four truefalse values here.
true false true false
# of trues is:
Type four truefalse values here. false true true true
# of trues is:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
