alaa sham
Junior Member
Join Date: May 2012
Posts: 1

 05-25-2012
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 3: Houssam
Name of Candidate 4: Khaled
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

Houssam 9 0.3461539
Khaled 1 0.03846154

First Candidates are:
Houssam