Starting from:

$15

C++ Program That Reads The Travelled Distance Of A Car In Km

A local Road Safety Department is tasked with monitoring and issuing speeding tickets and warnings for drivers who violate the 120 km/hr speed limits. Write a complete C++ program that reads the travelled distance of a car in km (as integer) and the elapsed time in minutes (as integer). The program should compute the speed of the car and issue violation ticket if the driver exceeds the speed limit. The program must distinguish between private small vehicles (‘S large commercial trucks and government owned ones

Your program should perform the following tasks:

Prompt the user to enter the type of the car (S, T, or G).

Prompt the user to enter the travelled distance.

Prompt the user to enter the elapsed time.

Convert the time from minutes to hours. (e.g. 90 minutes = 1.5 hours)

Compute the speed as the travelled distance divided by the time in hours.

Check if the driver violated the speed limit Of 120 km,’hr and issue speed violation

ticket/notices/action according to the following table:

More products