Question: Requirements: Task 1: distance Write a program in CH based on the use of IF, ELSE IF and ELSE statements to compare between two distances

 Requirements: Task 1: distance Write a program in CH based on

Requirements: Task 1: distance Write a program in CH based on the use of IF, ELSE IF and ELSE statements to compare between two distances given time t (entered by the user in minutes for two trips and the program should convert it into seconds). The speed s is constant in both cases and equals 85 km/h (the speed should be converted in the program into m/s). The distance can be calculated according to the formula: distance (in m) = speed (in m/s) * time (in s) The program should determine whether the distance of trip A is greater than, smaller than or equal to the distance of trip B. The program should have a similar output to the example below: ***The speed is 85 km/h*** Enter the time in minutes for trip A 2 Enter the time in minutes for trip B 4 The distance travelled in trip A is 2833.33 The distance travelled in trip B is 5666.67 The distance travelled in trip A is smaller than the distance travelled in trip B

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!