Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need help programming this using fortran 2) Write a program to calculate the speeding fines in Ontario for a car on a highway. After

image text in transcribed

i need help programming this using fortran

2) Write a program to calculate the speeding fines in Ontario for a car on a highway. After detecting the speed on a speed-gun, a police officer will enter the speed as an input to your program. The office will also enter the speed limit on that highway. Your program will calculate the total fine and show appropriate output based on the following regulations: Kilometres a) 1-19 kilometres per hour over the maximum speed limit b) 20-29 kilometres per hour over the maximum speed limit c) 30-49 kilometres per hour over the maximum speed limit d) 50 kilometres per hour or more over the maximum speed limit Set Fine $2.50 per kilometre $3.75 per kilometre $6.00 per kilometre No out of court settlement Use If...then...else statements in your program to calculate the fines. The program should check the validity of the speed and the limit so that the entered values are within a reasonable boundary. You can make your own definition of reasonable'. For example, a car running on the highway cannot have a speed of 10,000 km/hour. Similarly, the none of Ontario highways has a limit of just 10 km/hour. Again, these are just examples. Use your own validity checks

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

More Books

Students also viewed these Databases questions