The following table shows the approximate speed of sound in air, water, and steel: Write a program

Question:

The following table shows the approximate speed of sound in air, water, and steel: 

Write a program that asks the user to enter “air”, “water”, or “steel”, and the distance that a sound wave will travel in the medium. The program should then display the amount of time it will take. You can calculate the amount of time it takes sound to travel in air with the following formula: 

Time = Distance / 1,100 

You can calculate the amount of time it takes sound to travel in water with the following formula: 

Time = Distance / 4,900 

You can calculate the amount of time it takes sound to travel in steel with the following formula:

Time = Distance / 16,400

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: