Answered step by step
Verified Expert Solution
Link Copied!

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***********

image text in transcribed

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 value

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2016 Riva Del Garda Italy September 19 23 2016 Proceedings Part 3 Lnai 9853

Authors: Bettina Berendt ,Bjorn Bringmann ,Elisa Fromont ,Gemma Garriga ,Pauli Miettinen ,Nikolaj Tatti ,Volker Tresp

1st Edition

3319461303, 978-3319461304

More Books

Students also viewed these Databases questions

Question

7. Identify four antecedents that influence intercultural contact.

Answered: 1 week ago

Question

5. Describe the relationship between history and identity.

Answered: 1 week ago