Create an Account

Already have account?

Forgot Your Password ?

Home / Questions / IN C programming The results from the mayor’s race have been reported by each precinct as...

IN C programming The results from the mayor’s race have been reported by each precinct as follows Candicate Candicate Candicate Candicate Precint

IN C programming

The results from the mayor’s race have been reported by each precinct as follows:

Candicate Candicate Candicate Candicate

Precint A B C D

1 192 48 206 37

2 147 90 312 21

3 186 12 121 38

4 114 21 408 39

Write a program to do the following:

1.) Use symbolic constants

#define PRECINTS 4

#define CANDIDATES 4

2 .) Display the table with appropriate labels for the rows and columns.

3.) Call a function

void printArray(const int votes[][CANDIDATS], int precints, int cands)

to display the votes of each candidate in a table. Write this function.

4.) Compute and display the total number of votes received by each candidate and the percentage of the total votes cast.

5.) If any one candidate received over 50 percent of the votes, the program should display a message declaring that candidate the winner.

May 27 2020 View more View Less

Answer (Solved)

question Subscribe To Get Solution

Related Questions