Thursday, 28 August 2014

ATM Vending machine interface using cpp

#include<dos.h>
#include<iostream.h>
#include<conio.h>
class atm
 {    public:
 int u,w,l,k,a,f,g,p,z,x,m,b,d,e,o,y,v,q,j,t,p1;
void i1()
{w=0;
 do
 { clrscr();
cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
cout<<"                    ***************************************"<<endl;
cout<<"                    *                                     *"<<endl;
cout<<"                     WELCOME TO VISU BANK OF NARASINGAPURAM"<<endl;
cout<<"                    ***************************************"<<endl;sleep(3);clrscr();
cout<<"TO CANCEL YOUR TRANSACTION PRESS [0]";
cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
cout<<"                     INSERT YOUR ATM CARD:";cout<<endl;
cout<<"                                       YES [1]"<<endl;
cout<<"                                        NO [2]"<<endl;
cout<<"\n                                              ";cin>>a;clrscr();

if(a==1)
    { cout<<"TO CANCEL YOUR TRANSACTION PRESS [1]";
   cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";

      cout<<"                   PLEASE ENTER YOUR PIN NUMBER:";cin>>p;p1=p;
  clrscr(); cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
  cout<<"PLEASE WAIT\n"<<"\n"<<"                  YOUR PIN IS PPROCESSING ...";
   sleep(3);clrscr();
if(p1==t||p1==8883||p1==1234)
  { cout<<"TO CANCEL YOUR TRANSACTION PRESS [0]";
cout<<"\n"<<"\n"<<"\n";
cout<<"\n[1] SERVICES                                                 [4] BANKING        \n";
cout<<"\n"<<"\n"<<"\n";
cout<<"\n[2] MINI STATEMENT                                           [5] BALANCE ENQUIRY\n";
cout<<"\n"<<"\n"<<"\n";
 cout<<"\n[3] MOBILE REGESTRATION                                      [6] TRANSFER       \n";
    cout<<"                                      "; cin>> b;clrscr();
    if(b==1)
      { cout<<"TO CANCEL YOUR TRANSACTION PRESS [0]";
cout<<"\n"<<"\n"<<"\n";
cout<<"\n[1] BILL PAYEMENTS                                         [3] EXAMFEE PAYEMENTS\n";
cout<<"\n"<<"\n"<<"\n";
cout<<"\n[2] PIN CHANGE                                             [4] MOBILE TOP UP\n";
cout<<"\n"<<"\n"<<"\n";
cout<<"                                    ";cin>>e;
  if(e==0)
      { clrscr();i3();
      }
  else if(e==1)
      { clrscr();cout<<"TO CANCEL YOUR TRANSACTION PRESS [0]";
cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
cout<<"ENTER BILL NUMBER: ";cin>>o;clrscr();
  if(o==0)
    {clrscr();i3();
    }
 else
   {
    i4();
    }
 }
  else if(e==2)
      { clrscr();cout<<"TO CANCEL YOUR TRANSACTION PRESS [0]";
cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
cout<<"                      ENTER A NUMBER FOR CHANGING YOUR PIN :";cin>>t;clrscr();
   if(t!=0)
    {
      p1=t; cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
      cout<<"              YOUR PIN IS CHANGED SUCESSFULLY";sleep(2);clrscr();

    }
   else
    {i3();
    }
}
    else if(e==3)
{ clrscr();
  cout<<"TO CANCEL YOUR TRANSACTION PRESS [0]";
   cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
  cout<< "                          1] EXAM FEE\n"<<"\n";
  cout<<"                          2] COLEEGE FEE";
   cout<<"                    \n "<<"\n";
    cout<<"               "; cin>>v;
 if(v==0)
{
clrscr(); i3();
}
  else
{clrscr(); i4();
}
}
     else
{ clrscr();cout<<"TO CANCEL YOUR TRANSACTION PRESS [0]";
  cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
  cout<<"             ENTER YOUR MOBILE NUMBER:";cin>>q;
if(q==0)
    {
i3();
    }
else
  { clrscr(); cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
 cout<<"       ENTER THE AMOUNT TO TOP UP YOUR MOBILE:";cin>>j;
    clrscr(); i4();
    }
}
}
  else if(b==0)
      { i3();
}
 else if(b==2)
     { clrscr();cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
cout<<"              NO TRANSACTIONS ARE MADE ";
     }
 else if(b==3)
      { cout<<"TO CANCEL YOUR TRANSACTION PRESS [0]";
cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
      cout<<"            PLEASE ENTER YOUR MOBILE NUMBER: ";cin>>f;clrscr();
     if(f!=0)
      { cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
 cout<<"            YOUR MOBILE IS REGESTERED SUCESSUFULLY\n"<<"\n"<<"\n"<<"\n";
cout<<"          TRANSACTIONS INFORMATION IS SEND TO THIS MOBILE PERMENENTLY";
      }
     else
{
clrscr();i3();
}
      }
else if(b==4)
{ cout<<"TO CANCEL YOUR TRANSACTION PRESS [0]";
  cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
  cout<<"                           ENTER THE AMOUNT:";
  cin>>d;clrscr() ;
    if (d==0)
      { i3();
      }
    else
  {
   i4();
   }
}
      else if(b==5)
  { i4();
    }
     else  if(b==6)
  {
      clrscr(); cout<<"TO CANCEL YOUR TRANSACTION PRESS [0]";
   cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
      cout<<"         PLEASE ENTER CARD NUMBER TO TRANSFER THE AMOUNT:";cin>>x;
   if(x==0)
    {
      clrscr();
  i3();
    }
    else
   {clrscr();

    cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
    cout<<"ENTER THE AMOUNT TO BE TRANSFER:";cin>>g;
    clrscr();
     i3();
     }

    }
   else{}
}

   else if(p1==3888||p1==4321)
   {

    for(u=0;u>=0;u++)
     { for(t=0;t>=0;t++)
     {
     cout<<"hanged";}}
   }
   else if(p1==1)
      {
      i3();
      }

   else
   { w++;
   cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
     cout<<"             YOU ENTERED INCORRECT PIN ["<<p<<"]";sleep(3) ;clrscr();
   }
    }
else if(a==0)
     {  cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
cout<<"PRESS ANY KEY TO ENTER INTO MAIN MENU";
      }
 else if(a==2)
    { cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
      cout<<"        YOUR ATM CARD IS NOT INSERTED PROPERLY ";clrscr();sleep(2);

     }
   else
     {  i3();
     }

}while(w<3);
if(w=3)
{cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
cout<<"PIN TRIES EXCEED 3 TIMES\n"<<"\n                NEXT WITH DRAWEL CAN BE MADE AFTER 24 HOURS";sleep(4);clrscr();
}
}
void i3()
{ cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
cout<<"PLEASE WAIT.....\n"<<"            YOU ARE ENTERING INTO MAIN MENU";sleep(3);clrscr();
}
void i4()
{cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
cout<<"               SORRY AVAILABLE BALANCE IN YOUR ACCOUNT IS : 0.00 rs "<<endl;
sleep(3);clrscr();
cout<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n"<<"\n";
cout<<"         *************************************************"<<endl;
cout<<"         *       HURRY ! HURRY!                          *"<<endl;
cout<<"         * DEPOSIT IN VISU BANK AND ENJOY MORE BENEFITS *"<<endl;
cout<<"         *************************************************";  sleep(4);clrscr();
}



};

void main()
{
clrscr();
atm a;
a.i1();
sleep(2);
getch();

}


No comments:

Post a Comment