Goals: Using switches Air 1,100 ft/s Water 4,900 ft/s Steel 16,400 ft/s Problem:
ID: 3542625 • Letter: G
Question
Goals: Using switches
Air 1,100 ft/s
Water 4,900 ft/s
Steel 16,400 ft/s
Problem: The following table shows the approximate speed of sound in air, water, and steel:
Write a program that displays a menu allowing the user to select air, water, or steel. After a selection has been made, the user should enter the distance a sound wave will travel in the selected medium. The program should then report the amount of time it will take. Round the answer to 4 decimal places
Input validation: Check that the user has selected one of the available menu choices. If they have not, allow re-entry before the switch is executed. Do not accept distances less than 0. If the user enters negative distance, allow re-entry.
Explanation / Answer
Im not really sure
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.