Question: c++ language Write a program to help a company store their monthly profit in a year and determine a few key facts from the sales

c++ language

Write a program to help a company store their monthly profit in a year and determine a few key facts from the sales data

i The total profit made

ii The name of the month with the lowest profit made

iii The name of the month with the lowest loss made

iv The number of months that make a loss

Answer the questions using the following functions

a) Function to fill up the array with the monthly profit/loss values from a file (Enter any 12 values for profit and loss in the file)

b) Function to display the content of the array

c) Function to find the total profit/loss made at the end of the year

d) Function that takes in a number between 0 and 11 and returns the corresponding name of month (e.g 0 - January, 1 - February)

e) Function that finds the name of the month where the lowest profit was made (function d above is required to help you with this)

f) Function that finds the name of the month where the lowest loss was made

g) Function that returns the number of months that make a loss

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!