Question: Help. Write a C++ program that determines which of a company's four divisions (North, South, East, West) has the greatest sales for the quarter. It

Help.

Write a C++ program that determines which of a company's four divisions (North, South, East, West) has the greatest sales for the quarter. It should include three functions at a minimum:

float getSales() is passed the name of a division. It asks the user for a division's quarterly sales figure, calls a validate() function that will validate the input, and then returns the value back to main(). This function should be called once for each division.

void validate() is called from the getSales() function to ensure the input value is not negative nor has character input. If invalid input is found, loop until the user enters a valid value. It will then return to getSales().

void findHighest() is passed the four sales totals. It determines which is the largest value and prints the name of the high grossing division along with its sales figure

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!