Part 3
------
Let's chat a little bit about looping:
Loops in C rely on the idea of Boolean expressions. In C, unlike some
other languages, there is no Boolean type.  Or at least there wasn't
until the C99 standard introduced it.  Since I don't have the ISO
standard handy at the moment AND as of this writing there is no compiler
that yet supports the new standard I'll show you the old way.  You use
plain integers instead. The integer value 0 in C is false, while any
other integer value is true.
There are three different ways to loop in the "C" language.  We have 
the "while" loop.  The "for" loop and the "do-while" loop.  Let's 
compare:
A "while" loop needs an initialization outside of the loop body.  Let's
take a look at a code fragment:
  int x;
  x = 0;
  while(x <= 10) {
    printf("Hey There!\n");
    printf("X = %d\n",x);
    x++;
  }
So there you have a "while" loop.  Let's walk through it:
On the first line we declare "x" to be an integer.  After that we set
the value of "x" to 0.  That is a fairly important part.  You must set
the initialization outside of the loop.  The next line is the loop
construct itself.  Translated it say's "while x is less than OR equal
to 10 then...".  If "x" is less than or equal to 10 it will execute the
statements inside the body of the loop.  Let's assume this is the first
time through the loop.  It will display "Hey There!".  Underneath that
it will print the value of "x".  Since "x" is 0 the first time through
the loop, it will display "0".  The last line of the loop looks rather
strange:  x++;  This means "increment x by 1".  It can also be written
as x = x + 1; or ++x.
Now onto the "for" loop:
  int x;
  for (x=0; x<=10; x++){
    printf("Hey There!\n");
    printf("X = %d\n",x);
  }
This displays exactly the same thing as the first.  Here's what's
different:
First we have an initialization inside the loop itself, instead of on
the outside like the while loop.  We also have an incrementation inside
the loop as well.  This is also different from the "while" loop, because
it's increment was inside the loop body.  From a beginners point of
view, the "for" loop is shorthand for the "while" loop.  There MAY be
cases where a "for" loop would be better than some other loop construct.
As you improve your skills with the language, you'll be able to decide 
if one loop would be more beneficial than another in a situation.
Now finally, the "do-while" loop:
  int x;
  
  x = 0;
  do{
    printf("Hey There!\n");
    printf("X = %d\n",x);
    x++
  } while (x<=10)
The "do-while" needs to initialize outside of the loop.  It must also
have an increment operator somewhere inside.  (Unless you like endless
loops).  It compares at the BOTTOM of the loop.  This is the only loop
that does so.  This means that it will always run through the loop at
least once, before it compares it's values.  Maybe this is what you want;
Maybe not.  Be wary.  One last thing; the while statement must follow a
closing brace.  It CANNOT be inside the body of the loop.
There you have the differences between the looping constucts available.
Let's go to Part 4.