Question: In C++ Language Please. Write a program that asks the students to enter the number of courses they each have and then, store it a

In C++ Language Please.In C++ Language Please. Write a program that asks the students to

Write a program that asks the students to enter the number of courses they each have and then, store it a vector. The program should contain a function, findMedian(...) that accepts as arguments a vector containing the number of courses. The function returns the median value of the number of courses to the main(). The program has additional requirements as follows: - The program should ask number of users as input to decide the size of the vector. -Do not use the '[ ]'operator to access the elements of the vector. - Use pass-by-reference to pass the vector to the function findMedian(...). MEDIAN: a set of values sorted in ascending or descending order, its median is the middle value. If the set contains an even number of values, the median is the mean, or average, of the two middle values. Example output: Case 1: odd number of elements in the vector 52145 The median is: 4 Example output: Case 2: even number of elements in the vector 3425 The median is: 3.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!