
-----------------------------------
princess
Thu May 29, 2003 10:26 pm

my bank machine doesn't work...
-----------------------------------
ya well my bank machine doesn't work and i don't know why... i think it might be the getch.. put still i don't understand what i am doing wrong... can someone help me


var balance : real %globel variable
var font1, font2 : int
balance := 1000 %assigning variable a value
font1 := Font.New ("Lucida Console:32:Bold")
font2 := Font.New ("Lucida Console:14")



procedure Deposit %start of procedure
    var deposit : real %declaring all variables
    put "DEPOSITS" %Title of the procedure
    put ""
    put ""
    put "Enter amount of deposit: " .. %Asking for user input
    get deposit %user input
    balance := balance + deposit %adding deposit to the balance
    put "Current balance: $", balance %outputing the new balance
end Deposit %end of procedure



procedure Withdrawal %start of the procedure
    var withdrawal : real %decalre all variables
    put "WITHDRAWALS" %tile fo the procedure
    put ""
    put ""
    put "Enter amount of withdrawal: " .. %asking for user input
    get withdrawal %user input
    if withdrawal 