September 1998
Intermediate to advanced
848 pages
20h 13m
English
Now let's look at something a little more decorative. The plan is to create a program that enables you to draw rough, filled-in figures by using characters. Each line of output consists of an unbroken row of characters. You choose the character and the starting and stopping positions for printing the character in the row. The program, shown in Listing 8.8, keeps reading your choices until it finds EOF. This program illustrates several programming techniques, which, of course, we'll discuss soon.
/* sketcher.c -- this program makes solid figures */ #include <stdio.h> #include <ctype.h> #define TRUE 1 #define FALSE 0 #define MAXLENGTH 80 int badlimits(int begin, int end, int limit); void ... |
Read now
Unlock full access