
November 14th, 2012, 10:14 AM
|
Registered User
|
|
Join Date: Nov 2012
Posts: 1
Time spent in forums: 6 m 19 sec
Reputation Power: 0
|
|
Syntax errors - Payroll program help
I do not know why this program is just repeating the begining question over and over can anyone help??
#include <iostream>
using namespace std;
int main (){
int emp, super, totemp11= 0, stopit=1;
double rate, hrs, gross, totgross, totall = 0;
while(stopit==1){
cout <<"Enter Employee #... then Press ENTER ";
cin >>emp;
cout <<"Enter Supervisor #... then Press ENTER ";
cin >>super;
cout <<"Enter Rate... then Press ENTER ";
cin >>rate;
cout <<"Enter Hours... then Press ENTER ";
cin >>hrs;
gross = hrs * rate;
totall += gross;
}
if(super==11){
totgross += gross;
totemp11 ++;
cout << emp <<"\t" << rate <<"\t" << hrs <<"\t" << gross <<"\n\n";
cout <<"1 to_continue, 0 to stop";
cin >> stopit;
cout <<"Total employes 1 1" << totemp11 <<"\n";
cout <<"Total gross 11 " <<totgross <<"\n";
cout <<"total gross all " << totall <<"\n\n";
}
system("pause");
return 0;
}
|