The program is drawing on a grid 9 wide by 10 high. The loop is going over each space in this grid. It puts a * in each cell that falls within the equations described by the four inequalities. Here's a slightly more simplified version.
int putchar ( int ) ;
int main ( void )
{
int z;
int width = 9;
int height = 10;
for (z = 0; z < width * height; z++)
{
int x = z % width;
int y = z / width;
putchar (
x + y > 3 && /* top left */
x + y < 14 && /* bottom right */
y < x + 6 && /* bottom left */
y > x - 5 /* top right */
? '*' : ' ' );
if (x == width - 1)
putchar ( '\n' );
};
putchar ( '\n' ) ;
return 0;
}
It would be clearer to separate the main loop into nested loops for x and y, but I've left it as is to show a closer resemblance to the previous version.The fun part is that you can now play with the various settings. Try increasing the height and width and scaling the equations appropriately. Replace x by 2 * x or x * x for more interesting shapes. You can bound the picture by any equations you like. Example: http://ideone.com/53Qh3