A22.0002

Homework assignment #5

Due date: see handout.

Write a program that produces block letters for any of the following letters read into your program: A, B, C, E, F, G, H, I, J, L, O, P, S, T, or U.

For example, the letter T would be formed by procedure ProcT as follows:

***********
     *
     *
     *
     *
     *
     *
     *
     *
where Line(6) would produce:
      *
      *
      *
      *
Thus ProcT would be written as:
procedure ProcT;
    HorizLine;
    Line(6);
    Line(6);
    writeln
END;
\ Thus if the procedure heading for Line is procedure line(m:integer); then you should use m as the field width for for printing the *. Your program should use procedure Line to produce C, E, F, G, I, J, L, P, S, and T. Your program should read a sequence of N letters and then pass each of these letters, one at a time, as a value parameter to a procedure. By using IF statements or a CASE statement this procedure should call the procedure that generates the appropriate letter. All the letters should be the approximately the same height.

Sam Marateck
Tue Nov 5 23:06:11 EST 1996