Untitled
unknown
plain_text
a year ago
1.2 kB
3
Indexable
#include <iostream> using namespace std; int main(){ int option; char choice; again: cout << "\t\tM e n u"<<endl; cout << "\t\t*******"<<endl<<endl; cout << "1. Withdraw\t\t2. Deposit"<<endl; cout << "3. Check Balance\t4. Transfer"<<endl; cout << "0. Exit"<<endl<<endl; cout << "Select option: "; cin >> option; switch (option){ case 0: cout << "Do you want to exit? (y/n): "; cin>>choice; break; case 1: cout << "You selected Withdraw."<<endl; break; case 2: cout << "You selected Deposit."<<endl; break; case 3: cout << "You selected Check Balance."<<endl; break; case 4: cout << "You selected Transfer."<<endl; break; default: cout << "You selected invalid option!"<<endl; break; } if(choice == 'N' || choice=='n'){ goto again; } if(choice == 'Y' || choice == 'y'){ cout<<"Bye...."; } return 0; }
Editor is loading...
Leave a Comment