Question: C++ Screen Shot 2017-10-10 at 3.08.33 PM You will be calculating the number of seconds it will take for sound to travel though a medium.

C++

Screen Shot 2017-10-10 at 3.08.33 PM C++ Screen Shot 2017-10-10 at 3.08.33 PM You will be calculating thenumber of seconds it will take for sound to travel though a

You will be calculating the number of seconds it will take for sound to travel though a medium. The values you will use are as follows: Medium Speed (feet per second) Air Water4,900 Steel 16,400 1,100 Your program will display a menu of three items: Select the medium that sound is traveling through: 1 Air 2 Water 3 Steel Your program will then read in an unsigned int value Use a switch statement to process the menu value you have just read in. If the value is invalid (0, or greater than 3) display the following error message: The menu value is invalid. Please run the program again If the menu value is valid, read in the distance (in feet) that sound will travel in the medium selected. This will look as follows: Enter distance (in feet) If the distance is less than or equal to zero output the message The distance must be greater than zero If the distance is greater than zero, calculate the speed and output the following (this is for air): Air: 1000.0 ft Traveled for 0.9 seconds Note that the output values have one digit of precision

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!