Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The speeding fine in some small town in the countryside outside Metropolis is $50 plus $5 for each mph over the speed limit. There is
- The speeding fine in some small town in the countryside outside Metropolis is $50 plus $5 for each mph over the speed limit. There is also a penalty of $200 for any speed over 90 mph. Write a program that accepts a speed limit and clocked speed as input and prints "legal" if the speed is legal, or the fine amount and "illegal" if the speed is not legal. Submit the source code as an answer. Show results for running with a legal speed, an illegal speed without the bonus fine, and an illegal speed with the bonus fine.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started