Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a working C program to calculate fines for speeding. The program will do the following: A user is prompted to enter a positive number

image text in transcribed

Write a working C program to calculate fines for speeding. The program will do the following: A user is prompted to enter a positive number representing a vehicle's speed. Use the variable speed to store entered data. The program will then determine the fine based on the following: o Fine is: $0 if between 0-80km/h o Fine is: $30 + $2.50 * (speed - 80) if speed is between 81 - 100km/h o Fine is: $100 + $5 * (speed - 100) if speed is above 100km/h If speeding fine is equal to zero (O) the following message is displayed on the screen: o Nothing to pay! If speeding fine is greater than zero (O), display a message with the speeding fine on the screen

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

Students also viewed these Databases questions