Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Database Technology Edbt 88 International Conference On Extending Database Technology Venice Italy March 14 18 1988 Proceedings Lncs 303

Authors: Joachim W. Schmidt ,Stefano Ceri ,Michele Missikoff

1988th Edition

3540190740, 978-3540190745

More Books

Students also viewed these Databases questions