Q1. Solve problem using 5-steps of Engineering Problem Solving Methodology (including algorithm)  Q2. Draw flowchart diagram  Q3. Write c++ program  Problem Statement: An election is a formal group decision-making process by which a population chooses a candidate by casting votes. Each candidate is assigned name and a specific symbol. A ballot paper is used to cast the vote. Each ballot paper contains symbols of the candidate. A person can vote a candidate by stamping on a specific symbol. The ballot paper should be considered as a spoilt ballot if a person does not stamp or stamp on more than one symbol. Finally ballot paper has to be dropped in a ballot box. Write a C++ program that reads the information from the user to enter the name of the candidate, the total number of received votes, and the spoilt votes in a local election. The total number of participants (candidates) are 5. If the user mistakenly enters any negative value, the program should consider that value as a positive integer. The program should output the name, total received votes, and the percentage of obtained votes by the winning candidate. The program should also display the percentage of the spoilt votes. Note: Use repetition and selection structures

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter2: Basic Elements Of C++
Section: Chapter Questions
Problem 5PE
icon
Related questions
Question

Q1. Solve problem using 5-steps of Engineering Problem Solving Methodology (including algorithm

Q2. Draw flowchart diagram 

Q3. Write c++ program 


Problem Statement:
An election is a formal group decision-making process by which a population chooses a candidate by casting
votes. Each candidate is assigned name and a specific symbol. A ballot paper is used to cast the vote. Each
ballot paper contains symbols of the candidate. A person can vote a candidate by stamping on a specific symbol.
The ballot paper should be considered as a spoilt ballot if a person does not stamp or stamp on more than one
symbol. Finally ballot paper has to be dropped in a ballot box.
Write a C++ program that reads the information from the user to enter the name of the candidate, the total
number of received votes, and the spoilt votes in a local election. The total number of participants (candidates)
are 5. If the user mistakenly enters any negative value, the program should consider that value as a positive
integer. The program should output the name, total received votes, and the percentage of obtained votes by the
winning candidate. The program should also display the percentage of the spoilt votes.
Note: Use repetition and selection structures

Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage