# Calculator program

Page 1 of 1

## 0 Replies - 3588 Views - Last Post: 07 April 2007 - 01:40 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=26087&amp;s=6410926572bd500f5bef69d42e6cf50a&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 Tman13

Reputation: 0
• Posts: 3
• Joined: 07-April 07

# Calculator program

Posted 07 April 2007 - 01:40 PM

Hi guys, I have a lottery calculator prgram im working on an I can't figure out how to get it to stop when you have \$0 (It's part of a bigger program)
:Lbl 7
:Output(3,7,"The")
:Output(4,5,"Lottery")
:ClrHome
:Lbl HH
:15->ZY
:Goto II
:Lbl II
:ZY-5->ZY
:Pause
:randInt(311,321)->U
:randInt(311,321)->V
:Output(1,13,U)
:Output(2,8,V)
:Pause
:clrhome
:If U=V
:ZY+10->ZY
:Disp "You win!","You have M"
:Pause
:Output(2,10,ZY)
:Pause
:Goto ZZ
:Else
:Disp "You lose...",You have M"
:Pause
:Output(2,10,ZY)
:Goto ZZ
This game is for fun.

Is This A Good Question/Topic? 0

Page 1 of 1

 .related ul{list-style-type:circle;font-size:12px;font-weight:bold;}.related li{margin-bottom:5px;background-position:left 7px!important;margin-left:-35px;}.related h2{font-size:18px;font-weight:bold;}.related a{color:blue;}