EasyManua.ls Logo

Sinclair QL

Sinclair QL
135 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
Loading...
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), card(4) and card(5)
Use a second FOR loop to output the 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’

Other manuals for Sinclair QL

Related product manuals