# TITLE: Gops # AUTHOR: Roy F A Maclean # EMAIL: rfamgm at gmail # WEB: http://www.spiderpixel.co.uk/caspro # DATE: 11Sep1996, 09Jan2000, 13Oct2002 # MAKE: CASIO # MODEL: 9850G # NOTES: In the program below the letter 'O' never appears. # If it looks like one it will in fact be the number '0' zero. # __________________________________________ # ~ on the alpha menu # <= less than or equal to # >= greater than or equal to # / division # -> assignment # => implication # <> not equals # Ran# random number (optn f6 f3 f4) # _ triangle symbol on the Pgrm menu (shift vars f5) # __________________________________________ # # You come back home to find that your house belongings # have been stolen ( 13 items: total worth $9100). # The guy that has stolen them agrees # to auction them back to you. # You've only got $91 on you, so he says: # "Okay I'll pretend I've only got $91 also." # "We'll each make a bid for each item, and whoever bids # highest gets the item. If we bid the same than it rolls # over into the next item." # # You must try to get back as much as possible. # At the end the worth of the things you have got back will # be displayed. # Try to get back all $9100. # Be careful not too bid everything at the start or you won't # get very much back. # # The calculator plays the part of the thief. # It makes a bid, then asks you for a bid. It then tells you # what its bid was so you can tell who got that item. # # If you try to bid more than the balance of what you've got left # then a message will be displayed # "BAL ONLY" # 35 # for example. # # Good Luck! # # __________________________________________ @@ Program "GOPS" Seq(0,X,1,13,1)->List 1 Lbl 0: 0->A~Z 91->A~B Lbl 1 1+Int 13Ran#->C List 1[C]=0=>Goto 9 13->F:Lbl 8 List 1[F]=0=>F->C List 1[F]=0=>Goto 9 Dsz F:Goto 8 Lbl 9 0->E:A=0=>Goto A B=0=>Goto 2 0->K:13->F:Lbl 4 List 1[F]=0=>K+F->K Dsz F:Goto 4 0->L:1->F:Lbl 5 List 1[F]=0=>L+F->L L>=K/2=>Goto 6 Isz F:Goto 5 Lbl 6 1+Int (ARan#/(13-D Int 2Ran#=>C+Int CRan# 1+3Ran#->M C+J>=F=>Int (Ran#Int M(C+J Ans>B=>B+1 Ans>A=>A D=12=>A Ans->E Lbl A 1->List 1[C] "ITEM WORTH":100C_ 0->G:Lbl 3 G>B=>"BAL ONLY" G>B=>B_ "YOUR BID"?->G G>B=>Goto 3 Frac G<>0=>Goto 3 G<0=>Goto 3 "CALC BID":E_ A-E->A:B-G->B E>G=>H+C+J->H G>E=>I+C+J->I E=G=>J+C->J E<>G=>0->J Isz D:D<13=>Goto 1 Lbl 2 9->A:Lbl B " ":Dsz A:Goto B "YOUR END TOTAL" 100I_ "NEW GAME"_ Goto 0