All pastes #781192 Raw Edit

uggh

public cpp v1 · immutable
·published 2007-11-18 19:59 UTC
rendered paste body
1811(2125(12) <+yo> if you want to make an atm machine use this code:1811(2125(14) <+yo> #include <iostream>1811(2125(15) <+yo> using namespace std;1811(2125(17) <+yo> int main( void )1811(2125(19) <+yo> {1811(2125(21) <+yo> int choice;1811(2125(22) <+yo> double balance=250.00;1811(2125(24) <+yo> double deposit;1811(2125(25) <+yo> double withdraw;1811(2125(27) <+yo> do1811(2125(29) <+yo> {Icout<<"1. Check My Balance"<<endl;1811(2125(31) <+yo> Icout<<"2. Make A Deposit"<<endl;1811(2125(32) <+yo> Icout<<"3. Make A Withdrawal"<<endl;1811(2125(34) <+yo> Icout<<"4. Exit"<<endl;1811(2125(35) <+yo> Icout<<"Enter your choice ";1811(2125(37) <+yo> Icin>>choice;1811(2125(38) <+yo> Iif (choice==1)1811(2125(40) <+yo> II{cout<<"Your balance is " <<balance<<endl;1811(2125(42) <+yo> IIcout<<endl;1811(2125(44) <+yo> IIcout<<endl;1811(2125(45) <+yo> IIcout<<endl;1811(2125(47) <+yo> IIcout<<endl;1811(2125(49) <+yo> II}1811(2125(50) <+yo> Iif (choice==2)1811(2125(52) <+yo> II{cout<<"How much do you want to deposit?";1811(2125(53) <+yo> IIcin>>deposit;1811(2125(55) <+yo> IIbalance=balance+deposit;1811(2125(57) <+yo> IIcout<<"Your new balance is " <<balance<<endl;1811(2125(58) <+yo> IIcout<<endl;1811(2126(00) <+yo> IIcout<<endl;1811(2126(02) <+yo> IIcout<<endl;1811(2126(04) <+yo> IIcout<<endl;1811(2126(06) <+yo> II}1811(2126(08) <+yo> Iif (choice==3)1811(2126(10) <+yo> II{cout<<"How much do want to withdraw?";1811(2126(12) <+yo> IIcin>>withdraw;1811(2126(14) <+yo> IIbalance=balance-withdraw;1811(2126(16) <+yo> IIcout<<"Your new balance is " <<balance<<endl;1811(2126(18) <+yo> IIcout<<endl;1811(2126(20) <+yo> IIcout<<endl;1811(2126(22) <+yo> IIcout<<endl;1811(2126(24) <+yo> IIcout<<endl;III1811(2126(26) <+yo> II}1811(2126(28) <+yo> }1811(2126(30) <+yo> while(choice!=4);1811(2126(32) <+yo> return 0;1811(2126(34) <+yo> }