Mid Program Sums
Mid Program Sums
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
-
- Veteran
- Posts: 109
- Joined: Thu Feb 10, 2005 12:38 pm
try something like for withdrawing money (my programming style is bad)
if that was anthing like what you were after
if you could please explain a little more i could probably help more
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
if you could please explain a little more i could probably help more
Reads variable and input?
Is this what you mean?
<pre>
'$include: 'c.txt'
rem just wanted it to be there
variable1=88888 'Read variable
input n 'Reads text inputed as variable 'n'
</pre>
<pre>
'$include: 'c.txt'
rem just wanted it to be there
variable1=88888 'Read variable
input n 'Reads text inputed as variable 'n'
</pre>