Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

write it in simple C ++ nothing complicated thanks image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions