Mid Program Sums
Posted: 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
Discuss QBasic, Freebasic, QB64 and more
http://petesqbsite.com/phpBB3/
Code: Select all
withdraw:
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
else
variable1-variable2
print "You have "variable1" left."
end if