Programming I & II


Exercise 4: Basic Ada Programming continued

Subprogram

Modify the program you've written in exercise 2 (the main procedure that displays a welcome message on the screen, followed by a triangle of stars) to use a subprogram. The subprogram should print a certain character a certain number of times on a line. The parameters of this subprogram are the character to display, and a number indicating how often it should be repeated.
Modify your main procedure to call this subprogram in order to display the lines of stars.

This exercise can be handed in after the lesson. Please mail your solution to Valentin.Crettaz@epfl.ch with the subject Subprogram of your_name.


EPFL | IC | LGL | Teaching | Programming I & II
Last modified 11/23/99, J. Kienzle.