Question: Write a full c++ program to do the following:- 1- define an array (employeeSal) with 5 elements and read them from user. The values in

Write a full c++ program to do the following:- 1- define an array (employeeSal) with 5 elements and read them from user. The values in employeeSal array refers to the salaries of 5 employees. 2-define another array(deptIds) that corresponds to employeeSal array and store the elements {2,2,1,1,5} in it. The values in deptIds array refers to the department ID where each employee works. 3-print the average of all Employee salaries working in deptIds 2 4-find the maximum employee salary in deptIds 1 5- print the deptIds number of the employee with minimum Salary. ex:- if the employeeSal array was = {500,300,200,700,100} and deptIds = {2 , 2 , 1 , 1 , 5} your output must be : the average for deptId 2= (500+300)/2=400 the maximum employee salary in deptIds 1= 700 the depIds number for minimum employeeSal =5

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!