On Tue, Oct 21, 2008 at 9:12 AM, April <[EMAIL PROTECTED]> wrote:
> I have a homework assignment where I have to create a program in C++
> where the user enters three data amounts on four different occasions
> (three months sales for four regions).  The program adds the region
> sums, and displays that along with the total for all regions and
> months.  This chapter is on the do while statement and I just don't see
> where the do while statement would go here.  I suppose I could cout <<
> Enter data; bla, bla, bla while the number is under 0 but if I stop
> taking data after three entries, I don't see the point.

int region_count = 0, month_count;

while(region_count < 4){
   month_count = 0;
   while(month_count < 3){
      ...
      month_count++;
   }
   ...
   region_count++;
}


-- 
PJH

http://shabbleland.myminicity.com/tra

Reply via email to