Switch

#include 
using namespace std;
int main()
{
 char grade=' ';
 while (grade != '3')
 {
  cout<<"\n\nMenu--------------"<<endl;
  cout<<"1. Show me balance"<<endl;
  cout<<"2. Deposit"<<endl;
  cout<<"3. Quit"<<endl;
  cout<>grade;
  switch (grade)
  {
  case '1':
   cout<<"My balance is $10000000000"<<endl;
   break;
  case '2':
   cout<<"Good Job"<<endl;
   break;
  case '3':
   cout<<"Thank you."<<endl;
   break;
  default:
   cout<<"Please enter correct choice."<>grade;
 return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *