Question 3 The electoral petition of 2021 was aimed at determining the winner of the 2020 election. The rule is that the

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Question 3 The electoral petition of 2021 was aimed at determining the winner of the 2020 election. The rule is that the

Post by answerhappygod »

Question 3 The Electoral Petition Of 2021 Was Aimed At Determining The Winner Of The 2020 Election The Rule Is That The 1
Question 3 The Electoral Petition Of 2021 Was Aimed At Determining The Winner Of The 2020 Election The Rule Is That The 1 (98.01 KiB) Viewed 129 times
Question 3 The electoral petition of 2021 was aimed at determining the winner of the 2020 election. The rule is that the winner of an election in Ghana must obtain at least 50% +1 of the valid votes cast. 2 a. Explain the concept of function in C++ (AN 5) b. Declare a function called Greatest, your function should have five arguments i. The two names of the presidential candidates with the most votes ii. Total number of votes for each of them. iii. Total valid votes cast. (AN 7) c. Your function should declare the candidate that had at least 50%+1 of the valid votes cast as winner. (AN 8) d. Explain the logic behind the code(AN 5) [TOTAL 25] Question 4 a. Critically explain why you would consider the concept of using functions in your program again running a couple of if else statements. (AN 5) b. Declare a function with three arguments all of type int. The function should return the greatest of the three arguments, however if any two or all three are the same, you function should return that value [(AN 8) c. Embed you function in a complete program that requests for three variable all of type int and display the conditions explained in “b” above. (AN 7) d. Critically explain the logic behind the code [AN 5] [TOTAL 25]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply