/* programming for A.T.M machine
by sanjay kumar singh , ggsestc*/
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
void main()
{
char ch;
long int amount,total=100000;
int n=85321,s,pass,cpass,npass,vpass,paswrd[10],password,len;
around:
{
gotoxy(30,5);
textmode(C4350);
cout<<" BANK OF INDIA ";
gotoxy(34,10);
cout<<" 24 HOURS ";
gotoxy(32,12);
cout<<" ATM FACILITY ";
gotoxy(25,22);
cout<<" DO U WANT TO USE ATM ";
gotoxy(53,21);
cout<<" YES...y \n";
gotoxy(53,23);
cout<<" NO....n ";
gotoxy(53,25);
cout<<"Enter Your Choice:";
cin>>ch;
}
clrscr();
gotoxy(20,15);
cout<<" THANK U ";
gotoxy(18,17);
cout<<" VISIT AGAIN ";
if(ch=='y'||ch=='Y')
{
clrscr();
gotoxy(15,12);
cout<<" Please Enter Your Card ... ";
getch();
clrscr();
gotoxy(15,12);
cout<<" Enter PIN Code...";
cin>>n;
if(n==85321)
{
clrscr();
gotoxy(25,15);
cout<<" WELCOME TO BANK OF INDIA ";
gotoxy(35,20);
cout<<" ATM ";
getch();
}
menu:
{
clrscr();
gotoxy(26,5);
cout<<" ENTER YOUR CHOICE ";
gotoxy(25,10);
cout<<" 1...CASH WITHDRAW ";
gotoxy(25,12);
cout<<" 2...BALANCE CHECK ";
gotoxy(25,14);
cout<<" 3...CHANGE PIN CODE ";
gotoxy(25,16);
cout<<" 4...EXIT ";
cin>>s;
}
if(s==1)
{
clrscr();
gotoxy(25,5);
cout<<" WITHDRAW ";
circle:
gotoxy(18,12);
cout<<" ENTER AMOUNT...";
cin>>amount;
if(amount%100==0)
{
gotoxy(18,15);
cout<<" U RECIEVE UR MONEY";
total-=amount;
gotoxy(18,17);
cout<<" CURRENT BALANCE IS "<<total;
gotoxy(18,22);
cout<<" DO U WANT RECIEPT FOR BALANCE
ENQUIRY ";
gotoxy(63,23);
cout<<" YES...y ";
gotoxy(63,24);
cout<<" NO...n ";
cin>>ch;
clrscr();
if(ch=='y'||ch=='Y'||ch=='n'||ch=='N')
{
clrscr();
gotoxy(20,11);
cout<<" DO U WANT TO CONTINUE FOR
MORE TRANSACTION ";
gotoxy(62,12);
cout<<" YES ";
gotoxy(62,14);
cout<<" NO ";
cin>>ch;
if(ch=='y'||ch=='Y')
{
clrscr();
goto circle;
}
else
{
gotoxy(40,20);
cout<<" DO U WANT TO
CONTINUE... ";
gotoxy(40,25);
cout<<" YES...y ";
gotoxy(40,27);
cout<<" NO...n ";
cin>>ch;
if(ch=='y'||ch=='Y')
{
clrscr();
goto menu;
}
else
{
clrscr();
gotoxy(20,10);
cout<<" THANK U ";
gotoxy(20,12);
cout<<" VISIT AGAIN ";
}}
}
else
{
cout<<" SORRY...PLEASE ENTER IN THE
MULTIPLE OF (100,500,1000...) ";
}
else if(s==2)
{
clrscr();
gotoxy(15,7);
cout<<" BALANCE ENQUIRY ";
if(total==0)
{
gotoxy(15,10);
cout<<" YOUR ACCOUNT HAVE NO BALANCE TO QUERY ";
}
else
{
gotoxy(12,11);
cout<<" ACCOUNT BALANCE IS "<<total;
gotoxy(12,16);
cout<<" DO U WANT TO CONTINUE ";
gotoxy(35,17);
cout<<" YES ";
gotoxy(35,18);
cout<<" NO ";
cin>>ch;
if(ch=='y'||ch=='Y')
{
clrscr();
goto menu;
}
else
{
clrscr();
gotoxy(15,7);
cout<<" THANK U ";
gotoxy(15,10);
cout<<" VISIT AGAIN ";
}
}
}
else if(s==3)
{
clrscr();
gotoxy(15,6);
cout<<" CHANGE PIN CODE ";
loop:
gotoxy(13,10);
cout<<" ENTER OLD PIN CODE ...";
cin>>cpass;
if(cpass==pass)
{
clrscr();
sph:
gotoxy(15,8);
cout<<" ENTER NEW PIN CODE... ";
cin>>npass;
clrscr();
gotoxy(15,10);
cout<<" AGAIN ENTER PIN CODE FOR
VERIFICATION... ";
cin>>vpass;
if(npass==vpass)
{
clrscr();
gotoxy(15,10);
cout<<" PIN CODE CHANGES
SUCCESSFULLY... ";
gotoxy(15,13);
cout<<" DO U WANT TO CONTINUE... ;
gotoxy(15,15);
cout<<" YES...y ";
gotoxy(15,17);
cout<<" NO...n ";
cin>>ch;
if(ch=='y'||ch=='Y')
{
clrscr();
goto menu;
}
else
{
clrscr();
gotoxy(15,12);
cout<<" THANK U ";
gotoxy(15,14);
cout<<" VISIT AGAIN ";
}
}
else
{
clrscr();
gotoxy(20,5);
cout<<" SORRY PIN CODE NOT
MATCH ";
goto sph;
gotoxy(15,12);
cout<<" PLEASE TRY AGAIN ";
}
}
else
{
clrscr();
gotoxy(20,5);
cout<<" PLAESE VERIFY YOUR PIN CODE ";
goto loop;
}
}
else
{
clrscr();
gotoxy(15,14);
cout<<" DO U WANT TO CONTINUE... ";
gotoxy(37,15);
cout<<" YES ";
gotoxy(37,16);
cout<<" NO ";
cin>>ch;
if(ch=='y'||ch=='Y')
{
goto menu;
}
else
{
clrscr();
gotoxy(15,18);
cout<<" THANK U ";
gotoxy(15,20);
cout<<" VISIT AGAIN ";
}
}
}
getch();
}
No comments:
Post a Comment