Question: 1. If you get a ticket for speeding, your fine is based on how much your speed exceeded the speed limit by. Suppose the fine

1. If you get a ticket for speeding, your fine is based on how much your speed exceeded the speed limit by. Suppose the fine is based on the following schedule: Amount over limit: Fine Greater than 0 but less than or equal to 10 $ 80 Greater than 10 but less than or equal to 20 $250 Greater than 20 $500 Complete the program below to input the legal speed limit and the speed the driver was driving at. Compute and output the fine. Complete getData to input the legal speed and drivers speed. Complete calcFine to calculate the fine. Add the prototypes (i.e. function declarations). Do not change any code already written in main(). (20 points possible. #include #include using namespace std; //Function declarations ______________________________________________________ ______________________________________________________ int main (void) { double speedLimit, driverSpeed, fine; //call function to input data getData(speedLimit, driverSpeed); //Call function to calculate the fine fine = calcFine(speedLimit, driverSpeed); cout << setprecision(2) << fixed; cout << "Your fine is: $ " << fine << endl; return 0; }//main //*******************Define functions*******************

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!