Question: *****PLEASE DO THIS PROBLEM IN C++*******DO NOT USE CONIO******** Chapter 05, Programming Challenge 06 (p. 294) The distance a vehicle travels can be calculated as

*****PLEASE DO THIS PROBLEM IN C++*******DO NOT USE "CONIO"********
Chapter 05, Programming Challenge 06 (p. 294) The distance a vehicle travels can be calculated as follows: distance speed time. For example, if a train travels 40 miles per hour for 3 hours, the distance traveled is 120 miles. Write a program that asks the user for the speed of a vehicle (in miles per hours) and how many hours it has traveled. The program should then use a loop to display the distance the vehicle has traveled for each hour of that time period. Do not accept a negative number for speed and do not accept any value less than 1 for time traveled. . Program #1: write only using while loops Program #2: write only using do-while loops Program should loop until the user enters correct data Sample Output: What is the speed of the vehicle in mph? 50 How many hours has it traveled? -4 How many hours has it traveled? 4 Hour Distance Traveled 50 100 150 200 2 3 Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
