The Speed of Sound
The following table shows the approximate speed of sound in air, water, and steel.
Medium | Speed |
Air | 1,100 feet per second |
Water | 4,900 feet per second |
Steel | 16,400 feet per second |
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.)
Input Validation: Check that the user has selected one of the available choices from the menu. Do not accept distances less than 0.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.