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
Get step-by-step solutions from verified subject matter experts
