January 01, 2003
Statements and LoopsListing 3: diagonal draws a diagonal line by calling drawpixel
struct POINT {int x, y};
void drawpixel(struct POINT *p);
void diagonal(int len)
{
int y;
for (y = 0; y < len; ++y)
drawpixel(&(struct POINT) {y, y});
}
|
|
||||||||||||||||||||||||||||
|
|
|
|