Is adding a negative value, the same as subtracting the corresponding positive value?

A good answer might be:

Yes. Deciding which way you want to do it is part of coordinating the three parts of a counting loop. It is easy to get confused about this.

Confusing Loops

Look at the following program fragment:

    int count     = 13;
    int decrement = -1;
    while ( count >= 0 )   // GREATER-than-or-equal operator
    {
      System.out.println( "count is:" + count );
      count = count - decrement;
    }
    System.out.println( "Count was " + count + " when it failed the test");
Look over each of the three parts of the counting loop.

QUESTION 8:

What will this program fragment print when it is run?

Click Here after you have answered the question