Computer Science, asked by hardikmehendruhm, 9 months ago

Write a program in python which will display the menu as shown below: Select a Language so I can translate for you and say "Good morning" 1)English 2)Italian 3)Spanish 4)German 5) Quit

Answers

Answered by yashgoel18
1

Answer:

#include <iostream>

using namespace std;

int main(void)

{

int x; // choice insertd by user

// displaying the menu

cout << "Select a Language and I Will Say Good Morning" << endl

<< "1. English" << endl

<< "2. Italian" << endl

<< "3. Spanish" << endl

<< "4. German" << endl

<< "5. End the program" << endl

<< "Enter your selection." << endl;

// taking the input

cin >> x;

// applying conditions on user input

switch(x)

{

case 1: cout << "Goog morning." << endl;

break;

case 2: cout << "Buongiorno." << endl;

break;

case 3: cout << "Buenos dias." << endl;

break;

case 4: cout << "Guten morgen." << endl;

break;

// exiting the program

case 5: exit(1);

// default condition for invalid input

default: cout << "Wrong choice.";

}

}

Explanation:

Hope it helps mark me as brainleist

Similar questions