The Payroll Program
Loop Revisited
 cin >> empNum;
 moreData = (empNum != 0);     // Initialize flag
 while (moreData)
 {
      .
      .
      .
      cin >> empNum;       // Get the next
             // employee number
      moreData = (empNum != 0);   // Update the flag
             // accordingly
 }