Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program called ElectionStatistics that accepts as user input the names of three political parties and the number of votes each received in the

Write a program called ElectionStatistics that accepts as user input the names of three political parties and the number of votes each received in the last mayoral election. Display the percentage of the vote each party received.
An example of the program is shown below:
Enter name for first party >> Surprise party
Enter votes received >>23
Enter name for second party >> Pool party
Enter votes received >>87
Enter name for third party >> House party
Enter votes received >>55
The Surprise party got 13.939393939393941 percent of the vote
The Pool party got 52.72727272727272 percent of the vote
The House party got 33.33333333333333 percent of the vote

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions