please help me

Joined
May 25, 2012
Messages
1
Reaction score
0
i have very difficult homework , can you help me ,please
We want to write a program to calculate the electoral votes of a number of candidates running as follows:
The program requires input the total number of candidates. Then ask enter the names of the candidates.
After being introduced as numbers correct sounds positive, represents the numbers of candidates, the introduction ends with the vote number 0.
Required of the program show the following results:
- The number of votes obtained by each candidate
- The percentage of votes for each candidate
- The smallest number of votes
- The largest number of votes
- The name (or names) of candidates obtaining the largest number of votes
Example for the implementation of the program: (income and output in blue in red)
Number of Candidates: 5
Name of Candidate 1: Ahmad
Name of Candidate 2: Ryad
Name of Candidate 3: Houssam
Name of Candidate 4: Khaled
Name of Candidate 5: Zyad
Voice for: 1
Voice for: 2
Voice for: 2
Voice for: 1
Voice for: 1
Voice for: 3
Voice for: 4
Voice for: 5
Voice for: 3
Voice for: 2
Voice for: 2
Voice for: 2
Voice for: 3
Voice for: 3
Voice for: 3
Voice for: 1
Voice for: 2
Voice for: 3
Voice for: 2
Voice for: 3
Voice for: 5
Voice for: 2
Voice for: 3
Voice for: 2
Voice for: 3
Voice for: 0

Ahmad 4 0.1538462
Ryad 9 0.3461539
Houssam 9 0.3461539
Khaled 1 0.03846154
Zyad 2 0.07692308

minimum votes = 1
maximum votes = 9

First Candidates are:
Ryad
Houssam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

I dont get this. Please help me!! 2
Can anyone please help me in this code 2
HELP PLEASE 4
Help me 4
Arduino Code Please Help 0
Help please 8
Building App doesnt work 1
Code help please 4

Members online

Forum statistics

Threads
473,979
Messages
2,570,185
Members
46,723
Latest member
TwilaTarde

Latest Threads

Top