Atm machine using c++

13,542 views

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
13,542
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
153
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Atm machine using c++

  1. 1. # include<constream.h>int main(){clrscr();int password;for (int i=0;i<3;i++){cout<<"enter password:n";cin>>password;if (password==12345){cout<<"correct!n";double balance=50000;double withdraw,deposit;int option;cout<<"n";cout<< " *************Aqib memon****************n"; cout<<" *****************Welcome****************n"; cout<<"******Automated teller machine*******"<<endl; cout<<"choose a transaction n"; cout<<"n"; cout<<"[1] inquire balance n" <<"[2] withdraw n" <<"[3] deposite n" <<"[4] Quit n" <<"n" <<"Enter option:"; cin>>option; switch(option) { case 1: cout<<"n [[[BALANCE INQUIRY]]]n"; cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); cout<<"n your current balance is Rs:"<<balance<<endl; break; case 2: cout<<"n [[[WITHDRAW]]]n"; cout<<"n Enter ammount Rs:"; cin>>withdraw; balance=balance-withdraw; cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); cout<<"you withdrew Rs:"<<withdraw<<endl; cout<<"your remainig balance is"<<balance<<endl; continue;
  2. 2. case 3: cout<<"n [[[deposit]]]n"; cout<<"Enter ammount Rs:"; cin>>deposit; balance=balance+deposit; cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); cout<<"You deposited Rs:"<<deposit<<endl; cout<<"Your new balance is"<<balance<<endl; continue; case 4: cout<<"n***[[[EXIT MODE]]]***n"; break; default : cout<<"n That is an invalid optionn"; } break; } else cout<<"n please try again n"; }getch();return 0;}

×