You must ask the user for some input values. Arrange for your program to produce output
Fantastic news! We've Found the answer you've been seeking!
Question:
- You must ask the user for some input values.
- Arrange for your program to produce output such that: * For the first 10 miles over the speed limit, the fine is 100 no matter what * For any additional mile past the first ten, 10 dollars are added to the fine
- Finally, your program should print how many miles you were going over the speed limit and how much money the fine will be.
- Sample output based on the example story above:
- You reported a speed of 85 MPH for a speed limit of 60 MPH. You went 25 MPH over the speed limit. Your fine is $250.
- You must compute the required information without using if-statements. To evaluate an expression conditionally, use the ternary operator
- Make sure your program works correctly for 0 MPH and all possible positive speeds
Related Book For
Posted Date: