Search:

Type: Posts; User: drawar

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    1,249

    Great explanation, thank you! :)

    Great explanation, thank you! :)
  2. Replies
    7
    Views
    1,249

    Yes, but I still don't understand the if...

    Yes, but I still don't understand the if statement, I've seen if (i%2 == 0) .... but not if(i%2)
  3. Replies
    7
    Views
    1,249

    Thanks for clarifying my guess. I just don't know...

    Thanks for clarifying my guess. I just don't know what (i%2) means, and why it's true in this case.
  4. Replies
    7
    Views
    1,249

    Infinite 'for' loop

    int i = 1;
    for ( ; ; )
    if (i >= 10)
    break;
    else
    if (i % 2)
    i += 2;
    else
    i -= 2;
    printf("%d", i);
Results 1 to 4 of 4