Mid Program Sums

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply

Mid Program Sums

Post by PokeProgrammer » Thu May 12, 2005 11:24 am

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

Posts: 109
Joined: Thu Feb 10, 2005 12:38 pm

Post by RayBritton » Fri May 13, 2005 10:04 am

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?

Post by y12 » Fri May 13, 2005 8:17 pm

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'


Post Reply