beautypg.com

Sharp EL-5230 User Manual

Page 109

background image

107

How many digits can you remember?

The calculator displays randomly created numbers with the number of digits
(up to 9) you specified for the number of seconds you entered and asks you
to enter the number you remembered. After 10 tries the score is displayed.
The larger the number of digits and the shorter the seconds, the higher the
score is.

1.

Press b 2 1 0 to open a window for creating a NEW
program.

2.

Type NUMBER for the title then press e.

• A NEW program called ‘NUMBER’ will be created.

3.

Enter the program as follows.

Program code

Key operations

M=1

; M ; = 1 e

A=0

; A ; = 0 e

Print”HOW MANY DIGITS

i 1 @ a HOW s MANY
s DIGITS ; e

Label NINE

i 6 @ a NINE ; e

Print”LESS THAN 9 DIGITS

i 1 @ a LESS s
THAN

s ; 9 @ a s

DIGITS

; e

Input N

i 2 ; N e

If N>9 Goto NINE

i 8 ; N i G 9 ;
s i 9 @ a NINE
; e

Print”HOW LONG

i 1 @ a HOW s LONG
; e

Input T

i 2 ; T e

Label QUESTION

i 6 @ a QUESTION ;
e

Label AGAIN

i 6 @ a AGAIN ; e

S=ipart(random˚10^3)

; S ; = I 1 (
@ w 0 k @ Y 3
) e

Chapter 8: Application Examples

This manual is related to the following products: