Question: Question 4: ( 7 Marks) Write a C++ Program for a perfect voting system for the country. If a voter votes for PPP a message

Question 4: ( 7 Marks) Write a C++ Program for a perfect voting system for the country. If a voter votes for PPP a message should be displayed saying, "Your vote is rejected". If the voter casts a vote for PMLN a message should be displayed saying, "Congratulations! Your vote has been accepted and has been transferred to PTI Candidate". If a voter votes for PTI, display a message, You do not need to vote. I will manage bro!" Your program should announce the winner with the total number of vote casted, votes of individual candidates. Whoever gains the majority votes, your program should declare PTI candidate as winner. The counting of votes should be as below. A vote for PPP means 1 vote for PTI, 2 votes for PTI and zero for PMLN. A vote for PTI means 1 vote for PTI and zero for all others. A vote for PMLN means 2 votes for PTI and 1 vote for PMLN and zero votes for PPP. (Please take it as serious as our election system is. Moreover, consider it non-political and concentrate on solving it using while loop). The program should be controlled by a soldier and voting should continue as long as soldier keeps entering "Y" when soldier enters N the program should end with the result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
