Question: In C programming Write a program that is given two integers representing a speed limit and driving speed in miles per hour ( mph )

In C programming Write a program that is given two integers representing a speed limit and driving speed in miles per hour (mph) and outputs the traffic ticket amount.
Driving 10 mph under the speed limit (or slower) receives a $50 ticket. Driving 6-20 mph over the speed limit receives a $75 ticket. Driving 21-40 mph over the speed limit receives a $150 ticket. Driving faster than 40 mph over the speed limit receives a $300 ticket. Otherwise, no ticket is received. Driving 10 mph under the speed limit (or slower) receives a $50 ticket. Driving 6-20 mph over the speed limit receives a $75 ticket. Driving
21-40 mph over the speed limit receives a $150 ticket. Driving faster than 40 mph over the speed limit receives a $300 ticket. Otherwise,
no ticket is received.
Ex: If the input is:
3545
the output is:
75
Ex: If the input is:
3526
the output is:
0
In C programming Write a program that is given

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 Programming Questions!