I\'m writting this in C++ in Dev C++, and I can\'t get it to loop. The program c
ID: 663253 • Letter: I
Question
I'm writting this in C++ in Dev C++, and I can't get it to loop. The program comes up and works but then it won't let me enter another employee, to complete the loop part of the program. I can't figure out what I'm doing wrong in the code.
#include<iostream>
using namespace std;
int main() {
int employeeid;
int hoursworked;
int numberofemployees;
float hourlyrate, grosspay, taxamount, netpay;
float const TAXRATE = 0.20;
while(numberofemployees=0);{
cout<<"ENTER NUMBER OF EMPLOYEES:";
cin>>numberofemployees;
cout<<"ENTER THE EMPLOYEE ID:";
cin>>employeeid;
cout<<"ENTER THE HOURS WORKED:";
cin>>hoursworked;
cout<<"ENTER THE HOURLY RATE:";
cin>>hourlyrate;
grosspay = hoursworked * hourlyrate;
taxamount = grosspay * TAXRATE;
netpay = grosspay - taxamount;
cout<<"EMPLOYEE ID IS "<<employeeid<<endl;
cout<<"THE HOURS WORKED ARE "<<hoursworked<<endl;
cout<<"THE HOURLY RATE IS "<<hourlyrate<<endl;
cout<<"THE GROSSPAY IS "<<grosspay<<endl;
cout<<"THE TAXAMOUNT IS "<<taxamount<<endl;
cout<<"THE NETPAY IS "<<netpay<<endl;
numberofemployees = numberofemployees+1;
system("pause");
}//WHILE
return 0;
}//MAIN