Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Follow instructions to create a visual C++ project, add the CH code, compile, rum and fix errors. Save it to your Lab Assignment Folder in

image text in transcribed
image text in transcribed
Follow instructions to create a visual C++ project, add the CH code, compile, rum and fix errors. Save it to your Lab Assignment Folder in your Z drive or to your laptop. Write your Name, course, and date as comments on first line. First and last name CSDP 221 Program 07 03/9/21 > Explain what the program is to do along with any directions or instructions needed for program users 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.) Input Validation: Check that the user has selected one of the available choices from the menu. Do not accept distances less than 0. Expected outputs: 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.0091 seconds to travel 1000.000 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 sound wave takes 0.2041 seconds to travel 1000.0000 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 1000.eeee feet through steel. Microsoft Visual Studio Debug Console Select a medium: 1. Air 2. Water J. Steel Enter your choice - 3 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

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions