'C: For Loop: Why does a loop-continuation condition of "z" work the same as "z > 0"with a decrement of z--?

Full disclosure: I think I have answered my own question by formalising all of this. Please can you check my logic?

Using the following terminology: for (initialise control variable; loop-continuation condition [Boolean expression]; de/increment)

I have written a loop which prints out a Mario style pyramid:

    Welcome to Super Mega Mario! 
    Height: 5
        #  #
       ##  ##
      ###  ###
     ####  ####
    #####  #####

Within the code, I use two different loop-continuation conditions:

for (int z = i + 1; z > 0 ; z--)
for (int z = i + 1; z ; z--)

I am unsure why the second example works, below is my attempt to explain.

Why I think both of these work:

First example (z > 0):

To print the final line ##### #####, the for function prints "#" 5 times. First, because z == 5, so Bool is true, so print "#". Then z == 4, Bool is true, so print "#". This continues until z == 0, so the Bool is FALSE, so break.

Second example (z):

All non-zero values are true, z is 5,4,3,2,1. When z is 0 (FALSE), break.

I am learning, I want to develop excellent style and design, if you can explain which example is better designed, please let me know! Also, if you can recommend edits for my style, then please HMU too. [Source code @ end].

    int main(void)
    {
        int n;//Declare variables outside of loops to allow "while" function to use it.
        printf("Welcome to Super Mega Mario! \n");
        do
        {
            n = get_int("Height: "); //prompt user for height of pyramid.
        }
        while (n < 1 || n > 8);
        for (int i = 0; i < n; i++)//How many rows will be created
        {
            for (int j = 0; j < n; j++) //column
            {
                for (int x = n - i - 1; x; x--) //for(initialise control variable; loop continuation condition [boolean expression]; increment)
                {
                    printf(" ");
                }
                for (int y = i + 1; y; y--) //If the loop continuation condition is y, then it's TRUE. So the function will run. Then it decreases this value by 1, so it's now 0 or FALSE so the function breaks.
                {
                    printf("#");
                }
                printf("  ");
                for (int z = i + 1; z > 0 ; z--) //In theory "z>0" works the same as z on its own.
                {
                    printf("#");
                }
                break;
            }
            printf("\n");
        }
    }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source