9.8k views
3 votes
Write the definition of the function displaySubMenu that displays the following menu; this function doesn't collect the user's input; only display the following menu:

[S]top – Press 'S' to stop.

User Setanta
by
4.7k points

1 Answer

5 votes

Answer:

Using Python:

def displaySubMenu():

print("[S]top – Press ‘S’ to stop.")

Using C++ programming language:

void displaySubMenu(){

cout<<"[S]top – Press ‘S’ to stop.";}

Step-by-step explanation:

The function displaySubMenu() has a print statement that prints the following message when this function is called:

[S]top – Press 'S' to stop.

You can invoke this function simply by calling this function as:

displaySubMenu()

The function doesn't take any input from the user and just displays this message on output screen whenever this function is called.

In C++ you can simply call the function using following statement:

void main(){

displaySubMenu(); }

Write the definition of the function displaySubMenu that displays the following menu-example-1
User Matan Gubkin
by
4.9k points