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...
PROBLEMS ON CHAPTER 11
1. Place 12 letters, all different, in a string variable and another six letters in a second string variable.
Search the first string for each of the six letters in turn saying in each case whether it is found or
not found.
2. Repeat using single character arrays instead of strings. Place twenty random upper case letters in
a string and list those which are repeated.
3. Write a program to read a sample of text all in upper case letters. Count the frequency of each
letter and print the results.
"GOVERNMENT IS A TRUST, AND THE OFFICERS OF THE GOVERNMENT ARE
TRUSTEES; AND BOTH THE TRUST AND THE TRUSTEES ARE CREATED FOR THE
BENEFIT OF THE PEOPLE. HENRY CLAY 1829."
4. Write a program to count the number of words in the following text. A word is recognised because
it starts with a letter and is followed by a space, full stop or other punctuation character.
"THE REPORTS OF MY DEATH ARE GREATLY EXAGGERATED. CABLE FROM MARK
TWAIN TO THE ASSOCIATED PRESS, LONDON 1896."
5. Rewrite the last program illustrating the use of logical variables and procedures.

Other manuals for Sinclair QL

Related product manuals