Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- char input;
- do {
- cout << "Choose the menu list by its number: " << endl;
- cout << "1. Play" << endl;
- cout << "2. Option" << endl;
- cout << "3. Exit" << endl;
- cout << "Type your number: ";
- cin >> input;
- if (input == '1') {
- cout << "You choose play" << endl;
- return false;
- }
- else if (input == '2') {
- cout << "You choose Option" << endl;
- return false;
- }
- else if (input == '3') {
- cout << "You choose Exit" << endl;
- return false;
- }
- else {
- cout << "Type the correct number" << endl;
- }
- cout << endl;
- } while (true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement