The university election will start in few days … they decided to create a system that calculates the total number of votes and decide who won the election instead of counting the votes manually. There are three different groups (Hardee’s, KFC, and Krispy cream) who’ll participate in the election. The university will provide 10 boxes to carry the votes (5 boxes for the boys & 5 for the girls). You’ve been asked to create this system. Your system will read the number of votes for the participated groups from every single box (from a file) and then it should display the following information:
- The name of the winning group and the runner up.
- The vote difference between the winner and the runner up too.
- The number of the voting box who granted the highest number of votes for the first group.
- The number of the voting box who granted the highest number of votes for the second group.
- The number of the voting box who granted the highest number of votes for the third group.
i dont know why the output is not showing when am cout it it comes in one colume only starting from the 3rd row
Do you realize that without braces {} only one line is included within a loop body. I recommend you start using braces for every control statement, even those where they're not technically required.