A22.0002

Homework assignment #7

Write a program that produces the same block letters as the program for Assignment #6 did. Now, however, the letters printed should be in the reverse order of the letters inputted. For instance, if the letters read are A, C, E, the block letters printed would be E, C, A. To do this use, an array of characters defined in

var ray : array[1..30] of char

Read the characters using a while loop that tests for a period as the terminator of the sentence. The loop should also include a counter Count to determine the number of letters read. After all the letters are read, the next loop should send the letters in reverse order to a procedure that will print the letters (say procedure Block). Use a FOR-DO loop for this. Pass ray[J] as the actual parameter to procedure Block.