Question: NOTE: All programs that you write must have comments at the top with the program name, your name, and the pseudocode describing what the program

 NOTE: All programs that you write must have comments at the

NOTE: All programs that you write must have comments at the top with the program name, your name, and the pseudocode describing what the program will do. 1. Write a new C++ program called Lab5A that calculates the average speed when given distance & time. a. Ask the user for distance and time and then calculate the value of speed. (speed = distance / time) b. Make your variables have data type double. c. Print out the information with the following format: Distance Covered: distance miles Travel Time: time hours Average Traveling Speed: speed miles per hour d. Format your output with 2 decimal places. To do this, add the following line before you print the result: cout to the include section of your program. Example: If distance - 120 and time = 2, then the output would be: Distance Covered: 120 miles Travel Time: 2 hours Average Traveling Speed: 60.00 miles per hour

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!