text: 0
  I am just beginning in a C++ class and I am having a hard time setting up the code for using a modulus operator. The problem assigned has user input as name and hours worked. The program is to output the name, weeks worked, days worked, and hours worked based on the hours worked input. I keep getting errors on my code on the last part, which is the output. Can someone help me out on this? I'm very confused right now!
  my code:
  #include <iostream> using namespace std; int main () { // declares constants and variables string name ; //name is a variable of type string const int hoursweek = 40; const int hoursday = 8; int hours = 0; int weeks_worked = 0; int days_worked = 0; int hrs_worked = 0; int hours % hoursweek = 0; //enter input items cout <<"Enter employee's name: \n\n"; getline (cin,name); cout <<"\n\n"; cout <<"Enter number of hours worked: \n\n"; cin >>hours ; cout <<"\n\n" ; //calculate weeks, days, and hours worked weeks_worked = hours % hoursweek ; days_worked = hours % hoursweek ; hrs_worked = hours % hoursweek ; //enter output items cout <<"Employee's name: "<<name:<< worked <<hours % hoursweek<< " \n\n" ; system ("pause") ; return 0; }