Question: What's the solution ? Question 4 ( 14 marks ) Stock Market is the market in which shares of publicly held companies are issued and

 What's the solution? Question 4 ( 14 marks ) Stock Market

What's the solution?

Question 4 ( 14 marks ) Stock Market is the market in which shares of publicly held companies are issued and traded. Write a function generate Report() that takes as parameter a two-dimensional array named stocks of size 7x5, that contains companies stock prices in which each row represent a day and each column represent a company. The function displays the average stock price for each company. The function also displays the stock prices for the last company. For example, if the array contains the stock prices in the table below (left), then the output of the function should be displayed as follows (right): SAMPLE OUTPUT Day 0 Day 1 Day 2 Day 3 Day 4 Day 5 Day 6 Companies 0 1 2 3 4 3 1 1 78 1 1 1 1 10 9 6 7 1 10 1 1 1 1 10 3 1 1 7 8 1 1 1 1 10 9 6 7 1 10 Company O average stock price 3.85 Company 1 average stock price 2.42 Company 2 average stock price 2.28 Company 3 average stock price 2.71 Company 4 average stock price 9.43 PU 8 10 10 10 8 10 10

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!