0% found this document useful (0 votes)
8 views2 pages

Arrays

The document provides vote data from six candidates competing for chairman across four provinces of a university. Students are instructed to use C/C++ to store the vote data in arrays, calculate average votes per candidate and province, and display the raw votes, average per candidate, and average per province.

Uploaded by

noblebrians
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Arrays

The document provides vote data from six candidates competing for chairman across four provinces of a university. Students are instructed to use C/C++ to store the vote data in arrays, calculate average votes per candidate and province, and display the raw votes, average per candidate, and average per province.

Uploaded by

noblebrians
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

LAB ASSIGNMENT

The following are the votes obtained by six candidates competing for a chairman of UDOM
Assembly. The votes were recorded in for provinces of the University of Dodoma.

CIVE COED CNMS COESE Total per


Candidate
Candidate 1 123 65 42 76
Candidate 2 56 38 34 87
Candidate 3 90 23 75 65
Candidate 4 124 12 65 99
Candidate 5 78 98 68 87
Candidate 6 12 67 45 34
Total per
Province

Use the C/C++ programming language to do the following:

1. Store the votes in array called Votes


2. Calculate the average votes per candidate and store in an array called AvgVC
3. Calculate the average votes per province and store in an array AvgVP
4. Display all votes
5. Display the average votes per candidate
6. Display the average votes per province

Mode of the assignment:

1. Do in a group of five students


2. Collect your work (Ms Word document) of code and output snippets. Snip or print
screen the whole window of the desktop or laptop you have used.

3. Collect your work to your CR before 1200 hours of Saturday, 25/5/2024.

You might also like