Question: The Speed of Sound - string comparison methods 4 points The Speed of sound in Medium Speed Air 1100/sec Water 4900/sec Steel 16,400/sec Input -Write
The Speed of Sound - string comparison methods 4 points
The Speed of sound in
Medium Speed
Air 1100/sec
Water 4900/sec
Steel 16,400/sec
Input -Write a program that asks user to enter the medium air, water or Steel (which you store in string variable) and the distance that sound wave will travel in the medium.
First validate if the input is correct. Otherwise a message Please enter the correct medium should be displayed Calculations Time = Distance/speed
Output The amount of time it takes to travel in the medium Enter one of the following: air, water, or steel: steel Enter the distance the sound wave will travel: 2300 It will take 0.1402439024390244 seconds.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
