News for hackers. Stuff that matters.
Re:For loops help - comp.lang.c by mmastrac on Wednesday May 12, 2010 @04:09AM (#1340476)
The big expression in the middle is effectively unpacking a 2D point encoded in z. z % 9 is the x coordinate and z / 9 is the y coordinate:

  x = z % 9;
  y = z / 9;

  putchar (
          x + y > 3 &&
          x + y < 14 &&
          y < x + 6 &&
          y > x - 5 ? '*' : ' ' );

  if (x == 8)
    putchar ( '\n' );

Wolfram Alpha plots this inequality nicely:

http://www.wolframalpha.com/input/?i=x+%2B+y+%3E+3+%26%26+x+...

There are no comments on this comment yet.