Electrical and Computer Engineering
1
of 23
UAH
CPE 112
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
•
}
•