CS 150 Introduction to C++ Programming - Spring 1998 

[ Home | Lecture Notes| WebTutor | WebTutor Site Map]


Nested While Loops


Since a loop can have any C++ statement in its body, it can have another loop inside.
Putting one loop inside another loop is sometimes called "nesting" loops.
Nested loops occur naturally in solving many problems and are quite common in C++ programs.
Figuring them out requires clear thinking and careful analysis.

What does the following program fragment print out? (chapter 6 exercise 14)

This feature does not work on your browser - you need to be Java enabled!!

 

Choose one when done
   

Copyright chris wild 1998.
For problems or questions regarding this web contact [Dr. Wild (e-mail:wild@cs.odu.edu].
Last updated: February 28, 1998.