Class Exercise:  do..while

                        
Syntax:  do..while loop

   do
      statement
   while (expression);

   Description: This posttest iteration structure executes the statement
   [ {block} ] at least once, then the expression is evaluated.

1. Code a do...while loop that repeats until a "break" occurs.  The statement
   body should print a message and a value that indicates the loop count.






2. Write statements for a counter-controlled do...while that prints the
   digits from 1 to 5.





3. Code a do..while to print the even numbers from 2 through 10.






4. Create an event-controlled do-while loop for validating input values.
   The statement body should prompt and input a nbr until the user enters an
   integer value in the range 1 through 9.







5. Use a do...while loop to find the largest number input in a series of
   non-negative integer values typed at the console. Output that number.






6. Construct a event-controlled do...while structure to sum a set of scores.
   It is to use a char variable named more to signal whether looping is to 
   continue or terminate. Declare and initialize variables named more to 'y' and 
   sum to zero. The loop should continue while more is 'y'. Inside the loop,
   prompt and input a score value, add the score to sum, then prompt and input
   a user-supplied value for more to indicate whether there are more scores.