Question: write it in simple C ++ nothing complicated thanks The Speed of Sound The following table shows the approximate speed of sound in air, water,

The Speed of Sound The following table shows the approximate speed of sound in air, water, and steel. Medium Air Speed 1,100 feet per second 4,900 feet per second 16,400 feet per second Water Steel Use switch-case statement to write a program that displays a menu allowing the user to select air, water, or steel. After the user has made a selection, he or she should be asked to enter the distance a sound wave will travel in the selected medium. The program will then display the amount of time it will take. (Round the answer to four decimal places.) Inpur Validation: Check that the user has selected one of the available choices from the menu. Do not accept distances less than 0. Expected outputs: A Microsoft Visual Studio Debug Console Select a medium: 1. Air 2. Water 3. Steel Enter your choice: 1 Enter the distance: 1000 A sound wave takes 0.9991 seconds to travel 1000.0000 feet through air. Microsoft Visual Studio Debug Console Select a medium: 1. Air 2. Water 3. Steel Enter your choice: 2 Enter the distance: 1000 A sound wave takes e.2041 seconds to travel 1000.000 feet through water. Microsoft Visual Studio Debug Console Select a medium! 1. Air 2. Water 3. Steel Enter your choice: 3 Enter the distance: 1000 A sound wave takes 0.8610 seconds to travel 1800.ee feet through steel. Microsoft Visual Studio Debug Console select a medium: 1. Air 2. Water 3. Steel Enter your choice! - The valid choices are 1 through 3. Run the Sprogran again and select one of those. Microsoft Visual Studio Debug Console Select a medium 1. Air 2. Water 3. Steel Enter your choice: 1 Enter the distance: -1000 Distance must be greater than zero
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
