next up previous
Next: About this document

A22.0002 Fall 1996

Homework assignment #6

Due Wed Dec 4, 1996.

The final is on Monday, Dec 16, 1996, 2:00PM to 3:50PM

Write a program that produces the same block letters as the program for Assignment #5 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. Use a FOR DO loop for this. Pass ray[J] as the actual parameter to procedure Block. Do you have to change procedure Block?

Sam Marateck
Tue Nov 19 19:59:18 EST 1996