Atm machine using c++
Upcoming SlideShare
Loading in...5
×
 

Atm machine using c++

on

  • 1,785 views

 

Statistics

Views

Total Views
1,785
Slideshare-icon Views on SlideShare
1,785
Embed Views
0

Actions

Likes
0
Downloads
14
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Atm machine using c++ Atm machine using c++ Document Transcript

    • # 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);
    • 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;}