Page 185 - ARM Based Microcontroller Projects Using MBED
P. 185
8.11 PROJECT 8—LEARN YOUR TIMES TABLES 171
BEGIN
DO FOREVER
Clear screen and home cursor
Enter a number
Display heading
DO 12 times
Display the times table for the entered number
ENDDO
ENDDO
END
FIG. 8.31 Program PDL.
asks a number to be entered. The times table for this number is calculated from 1 to 12 and is
displayed on the screen. The program clears the screen, homes the cursor, and the process is
repeated after 5s asking for another number to be entered.
A typical display from the program is shown in Fig. 8.33.
FIG. 8.32 Program listing.
(Continued)