Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program (C++) that determines which division had the highest sales for a quarter. The four divisions are: Northeast, Southeast, Northwest and Southwest. You
Write a program (C++) that determines which division had the highest sales for a quarter. The four divisions are: Northeast, Southeast, Northwest and Southwest.
- You will have the following functions, getSales, findHighest, printResult, each of which will be called by main.
- The getSales function, you will input the sales for each division into an array called quartersales. You will use the index of the array to determine which division is the highest selling division. Northeast 0, Southeast 1, Northwest 2, Southwest 3.
- In the getSales function, valid the sales amount to make sure it is a positive amount. If a negative amount is entered, make the user enter the sales amount again.
- In the findHighest function, determine which division had the highest sales.
- In the printResult function, display the division name and the sales amount. The sales amount should always be printed with 2 decimal places.
- Submit your program to blackboard as usual. Always include the following lines of comments in your program as well as other internal documentation.
- When writing your programs, inputs should always have prompts so the user understands what needs to be input and output should always have descriptions as well.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started