I am stuck trying to write a loop that will conitunually ask for an employee number, gross pay, tax, and fed tax. the loop terminates when the user types in 0 as employee number, then program displays results for each employee:
I go this so far:
cout <<"Enter employee number: ";
cin >> number;
while (number > 0)
{
cout.precision(2);
cout.setf(ios::fixed | ios::showpoint);
cout <<"Enter gross pay: $";
cin>> grosspay;
cout <<"Enter State tax: $";
cin >> statetax;
cout <<"Enter fica: $"<<"\t";
cin >>fica;
cout <<endl;
I can't figure out how to loop it but keep the original employee number, meaning if someones number is 100 and the next number is 235, it won't switch the emplloyee numbers with the loop count
Any help would be appreciated