1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ostrovityanka [42]
3 years ago
10

Write a program that displays a menu allowing the user to select air water, or steel. After the user has made a selection, the n

umber of feet a sound wave will travel in the selected medium should be entered. The program will then display the amount of time it will take. (Round the answer to four decimal places.)
Computers and Technology
1 answer:
luda_lava [24]3 years ago
7 0

Answer:

// Program is written in C++ Programming Language

// Comments are used for explanatory purpose

// Program starts here

#include<iostream>

using namespace std;

int main ()

{

// Declare Variable

int selection;

// Prompt user to make a selection of medium between air, water or steel.

cout<<"Make Selection"<<'\n'<<"Press 1 for Air"<<'\n'<<"Press 2 for Water"<<'\n'<<"Press 3 for Steel";

cin>>selection;

// Check for entry

if(selection == 1) {

cout<<"You selected Air"<<'\n';

cout<<"The distance travelled by sound wave in air is 1,125 feet in 1 second";

}

else if(selection == 2) {

cout<<"You selected Water"<<'\n';

cout<<"The distance travelled by sound wave in water is 4859 feet in 1 second";

}

else if(selection == 3) {

cout<<"You selected Steel"<<'\n';

cout<<"The distance travelled by sound wave in steel is 19554 feet in 1 second";

}

else

cout<<"Invalid Selection";

return 0;

}

You might be interested in
The stub: transmits the message to the server where the server side stub receives the message and invokes procedure on the serve
elena55 [62]

Answer:

It does all of these

Explanation:

The stub is able to do all of what we have in this question. It can locate computer connections, locate ports on a computer, transit message to server etc.

in distributed computing, a stub is a piece of code that does the work of converting parameters that are passed between the client and the server at a time of remote procedure call.

The main objective of an RPC is to allow the client to call procedures remotely on another server.

3 0
3 years ago
Which of te following ranges of cells is correctly named
Natasha_Volkova [10]
D it is because its .a5.g1
3 0
3 years ago
When working in excel online, which of the following is considered a conditional formula?
Alika [10]
B. Because conditional statements have an IF before stating the condition
8 0
3 years ago
Read 2 more answers
Which table option automatically adjusts column widths to fit cell content? autofit contents merge cells autofit window fixed co
noname [10]
Which table option automatically adjusts column widths to fit cell content?
autofit contents
6 0
3 years ago
Lisa granted the CREATE TABLE privilege WITH ADMIN OPTION to Sharon. Sharon granted the privilege to Bob. If Lisa’s privileges a
GuDViN [60]

Answer:

D

Explanation:

As it's not fair if they all lose there privileges

4 0
3 years ago
Other questions:
  • Why are resources limited? Why can't we get everything all the time?
    12·1 answer
  • What is the final step used when designing an algorithm?
    14·1 answer
  • Write a C program that has the following statements: int a, b; a = 10; b = a + fun(); printf("With the function call on the righ
    12·1 answer
  • Given the commands below, what do they do? for (position = 1 through aList.getLength()/2) { a = aList.getEntry(aList.getLength()
    11·1 answer
  • Truncation is a keyword search technique that helps you find useful variations of a term or terms. You want to find books on the
    5·1 answer
  • Under what circumstances are composite primary keys appropriate?
    5·1 answer
  • What is the output of the following program?
    9·1 answer
  • Which would you trade on a stock exchange? A: Shares B: Bonds C: Annuities
    6·2 answers
  • Unwanted email sent to large groups of people who did not request the communication is called _____
    12·1 answer
  • Cuantos MB son 8,192 kb?​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!