Page 1 of 1

Mid Program Sums

Posted: Thu May 12, 2005 11:24 am
by PokeProgrammer
I need help! How can I create a program that reads one of my numbers that i have put in and reads one from a variable? Please help as i am trying to make a virtual bank

Posted: Fri May 13, 2005 10:04 am
by RayBritton
try something like for withdrawing money (my programming style is bad)

Code: Select all

variable1=1000 'this is how money in bank
input ">",variable2 'how much they want to withdraw
if variable2 > variable1 then 
        print "Not enough money" 
        sleep  'waits for input
        goto withdraw
      print "You have "variable1" left."
end if
if that was anthing like what you were after
if you could please explain a little more i could probably help more

Reads variable and input?

Posted: Fri May 13, 2005 8:17 pm
by y12
Is this what you mean?

'$include: 'c.txt'
rem just wanted it to be there
variable1=88888 'Read variable
input n 'Reads text inputed as variable 'n'