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
After execution of the following code, what will be the value of input_value if the value 0 is entered at the keyboard at run time?
cin >> input_value;
if (input_value > 5)
input_value = input_value + 5;
else if (input_value > 2)
input_value = input_value + 10;
else
input_value = input_value + 15;
//*******************Define functions*******************
2. After execution of the following code, what will be the value of input_value if the value 0 is entered at the keyboard at run time?
cin >> input_value;
if (input_value > 5)
input_value = input_value + 5;
else if (input_value > 2)
input_value = input_value + 10;
else
input_value = input_value + 15;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
