Stocks Program


[Prev][Next][Index][Thread]

Stocks Program



Here is a program that I made for my Personal Finance class. Enjoy.


-> is the store to sign.




stox()
Prgm
round(rand(100),0)+1->itemo
10000->smoney
0->change
0->no
0->nos
ClrIO
Output 1,1,"----------------------------------------"
For x,1,40
Output 10,x,"STOX!"
EndFor
Output 10,90,"By:Justin Smith"
Output 20,1,"----------------------------------------"
InputStr "Name your stock:",name
Lbl start
ClrIO
For x,1,20
Output 1,x,name
EndFor
Output 1,90,"Change:"
Output 1,135,change
Output 20,1,"Stock price:"
Output 20,75,itemo
Output 30,1,"Your money:"
Output 30,70,smoney
Output 40,1,"Your # of stocks:"
Output 40,105,no
Output 60,90,"0 to exit"
Lbl a
Input "How many stocks are you going to buy?=",nos
nos+no->no
If nos=0:Goto end
If smoney<itemo*nos:Goto a
smoney-nos*itemo->smoney
change*itemo+smoney->smoney
round(rand(10),2)+1->change
round(rand(2),0)->seed
If seed=2:change->change
If seed=1:-change->change
change+itemo->itemo
Goto start
Lbl end
ClrIO
For x,1,10
Output 1,x,"THANKS FOR PLAYING"
EndFor
Disp "Game Over!"
EndPrgm


<pre>
--
JZS 3=)
</pre>