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.
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 ratings0% 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.
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.
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.