Question: Number B (23 points: tables, basic statistic) (no functions yet) Write a program in C whose main function includes the declarations and initializations of the

Number B (23 points: tables, basic statistic) (no functions yet) Write a program in C whose main function includes the declarations and initializations of the following 3 tables: extension: character tables with the values P, P, O, P, P, A, O, A ("A" for analyst, "P" for programmer, "O" for operator) nbCafe: array of integers with the values 2, 1, 7, 0, 5, 4, 0, 3 age: array of integers with the values 25, 18, 47, 26, 69, 44, 56, 29 Add to the function main the declarations and the statements in C allowing 1. to display the content of these three tables 2. to count and display the number of analysts 3. to count and display the number of secretaries (position S which does not exist in the data) 4. to determine and display the maximum consumption coffee analysts 5. determine and display the minimum age for programmers; 6. calculate and display the operators' average coffee consumption; 7. calculate and display the average age of all employees; 8. sort by age and display the 3 tables again after sorting. (sorting is not internal)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!