Sharp EL-5250 User Manual

Page of 132
109
Program code
Key operations
Wait T
i 3 ; T e
Clrt
i 7 e
Print”ANSWER
i 1 @ a ANSWER ;
e
Input X
i 2 ; X e
If X Q Goto WRONG
i 8 ; X i H ; Q
; s i 9 @ a WRONG
; e
A=A+int(10˚N©T˚3)
; A ; = ; A + I
2 ( 10 k ; N z
; T k 3 ) e
Label WRONG
i 6 @ a WRONG ;
e
M=M+1
; M ; = ; M + 1 e
If M<=10 Goto QUESTION
i 8 ; M i E 10 ;
s i 9 @ a QUESTION
; e
Print”YOUR SCORE IS
i 1 @ a YOUR s
SCORE 
s IS ; e
Print A
i 0 ; A e
End
i 5 e
Running the program
4.
Press j to return to the PROG mode menu.
5.
Press 0, select the program ‘NUMBER’ and press e.
6.
Enter the number of digits you wish to play with N.
7.
Enter the number of seconds to display the numbers.
8.
Immediately after you press e, the game will start.
9.
After ‘ANSWER X=?’ is displayed, enter the number you remembered
and press e. After 10 tries, the score is displayed.
Chapter 8: Application Examples
* If answer is correct, add (30 x
number of digits / number of
seconds) to score.