Answered step by step
Verified Expert Solution
Question
1 Approved Answer
*******************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE*********** Write a program that determines which of a company's four divisions (Northeast, Southeast, Northwest, and
*******************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE******************************USING C++ LANGUAGE PLEASE***********
Write a program that determines which of a company's four divisions (Northeast, Southeast, Northwest, and Southwest) had the greatest sales for a quarter. It should include the following two functions, which are called by main: - double getSales () is passed the name of a division. It asks the user for a division's quarterly sales figure, validates the input, then returns it. It should be called once for each division. - void findHighest () is passed the four sales totals. It determines which is the largest and prints the name of the high-grossing division, along with its sales figure. Input Validation: Do not accept dollar amounts less than $0.00. EX \#2 Write a program that determines which of five geographic regions within a major city (north, south, east, west, and central) had the fewest reported automobile accidents last year. It should have the following two functions, which are called by main: - int getNumAccidents() is passed the name of a region. It asks the user for the number of automobile accidents reported in that region during the last ycar, validates the input, then returns it. It should be called once for each city region. - void findlowest () is passed the five accident totals. It determines which is the smallest and prints the name of the region, along with its accident figure. Input Validation: Do not accept an accident number that is less than 0. EX \#3 When an object is falling because of gravity, the following formula can be used to determine the distance the object falls in a specific time period: d=1/2gt2 The variables in the formula are as follows: d is the distance in meters, g is 9.8, and t is the amount of time, in seconds, that the object has been falling. Write a function named fa1lingDistance that accepts an object's falling time (in seconds) as an argument. The function should return the distance, in meters, that the object has fallen during that time interval. W'rite a program that demonstrates the function by calling it in a loop that passes the values 1 through 10 as arguments and displays the return valueStep 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