Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A state government has decided to standardize speeding tickets. The new speeding tickets will be based on the number of miles per hour a driver

A state government has decided to standardize speeding tickets. The new speeding tickets will be based on the number of miles per hour a driver was travelling over the posted speed limit. They will use the following table. MPH Over Limit Fine 1 - 9 $25 10 - 19 $50 20 - 29 $100 30 - 39 $250 40 or more $500 Assignment Write a program that asks the user the speed limit (in MPH) and the drivers speed in MPH. Compute the difference in speed and using a series of if statements determine the fine. Output the speed over the limit and the associated fine. If the driver was driving at or below the speed limit, the driver was driving legally and there is no fine. Output that the driver was not speeding. Be sure to include a comment at the beginning of the program with your name, date, and a short description of the program.

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

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions

Question

Describe forecasting requirements.

Answered: 1 week ago

Question

1. What might have led to the misinformation?

Answered: 1 week ago

Question

2. How will you handle the situation?

Answered: 1 week ago