EasyManuals Logo

Sinclair QL User Manual

Sinclair QL
422 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #48 background imageLoading...
Page #48 background image
PROBLEMS
ON
CHAPTER
6
1.
Use a FOR loop
to
place one
of
four numbers
1,2,3,4
randomly
in
five
array
variables'
32
card(1), card(2), card(3), card(4), card(5).
It
does
not
matter
If
some
of
the four numbers
are
repeated.
Use
a second FOR
loop
to
output the values
of
the
five
card variables.
2.
Imagine
that
the
four
numbers
1,2,3,4
represent
'Hearts;
Clubs:
'DIamondS:
Spades
What extra program lines would need
to
be inserted
to
get output
in
the form
of
these
words Instead
of
numbers?
3.
Use a FOR loop
to
place
five
random numbers
In
the
range 1
to
13
in
an
array
of
five
variables:
card(1), card(2), card(3),
CfJrd(4)
and card(5).
Use a second FOR loop
to
output
fhe
values
of
the
five
card variables.
4.
Imagine that
the
random numbers generated
in
problem 1 represent cards.
Write
down
the
extra statements that would cause the following output:
Number
Output
1
the word
'Ace
2
to
10
the actual number
11
the
word
:Jack'
12
the word 'Queen'
13
the word 'King'
12/84

Other manuals for Sinclair QL

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sinclair QL and is the answer not in the manual?

Sinclair QL Specifications

General IconGeneral
ProcessorMotorola 68008
Clock Speed7.5 MHz
RAM128 KB (expandable to 640 KB)
ROM48 KB
Operating SystemSinclair QDOS
Release Year1984
StorageMicrodrive tape loop
Graphics256x256 pixels, 8 colors
PortsRS-232, ROM cartridge
SoundBeeper (internal speaker)

Related product manuals