Question: Objectives - To analyze problems, w To practice 20 arrays Exercise# 1: Lab marks Write a program that do the following initializes a 2D array,
Objectives - To analyze problems, w To practice 20 arrays Exercise# 1: Lab marks Write a program that do the following initializes a 2D array, labs, that contains marks of 15 students (rows) in S labs (columns) The marks sre generated at random between 4 and 10 inclusive (vou need to use the rand() function) . .initializes a 2D array, lds, with the sales people names. Here is what you need to include: char idstis11201-(u1710000", "u171001, 07 "U1U1700e "U17100se" U171e06e, "u1710070,"U171 u176999", U1710100U171, "U171012" "U1718130", "U1710140) . Store the result in a 1D array (call it stdave) Computes the average lab mark for each student Displays the contents of the array m the required output. Show the student ID (setw( shown in the output below. arks in a tabular form as in the sample output. Use setw(4) to p (10)) as well as the average (setw(5)) of each student as Computes the average lab mark for all students. Store the result in a 1D array (call t 1abAvE) .Display the average lab mark as shown below .Report the ID of the student who scored the maximum average lab mark as shown Sample Input/Output 01710000 5 10 9 7 8.2 9 4 9 10 7.6 8 U1710010 6 1710020 490 10 4 7 1710030 5 10 4 8 8 7.0 1710040 6 7.6 1710050 11 8.6 10 9 1710060 5 9 5 01710070 8 87 72 6 4 5.8 8 86 9 7.6 01710000 4 8 1710100 88 5 5 5.6 4 5 8 J? 71 01 20 1710140 10 9 4 6 7 7.2 ab-avg: 7.1 7.5 6.4 7.5 6.6 Class average is: 7.0 1710050 scored the highest average mark (8.6)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
