Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
# include<constream.h>int main(){clrscr();int password;for (int i=0;i<3;i++){cout<<"enter password:n";cin>>password;if (pa...
cout.setf(ios::showpoint);  cout.precision(2);  cout<<"you withdrew Rs:"<<withdraw<<endl;  cout<<"your remainig balance is...
Upcoming SlideShare
Loading in …5
×

Atm machine using c++

3,651 views

Published on

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

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=10000;double withdraw,deposit;int option;cout<<"n";cout<< " *************Aqib memon****************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);
  2. 2. cout.setf(ios::showpoint); cout.precision(2); cout<<"you withdrew Rs:"<<withdraw<<endl; cout<<"your remainig balance is"<<balance<<endl; continue; 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;}

×