Hey everyone, I'm new to this site. one of my classmates told me about it so I'm giving it a try. anyway, for my class I need to write a code for a payroll program.
so far, this is what I've written...
//Assignment 4
//Page 218
//Question 7
#include <iostream>
#include <string>
using std::cout;
using std::cin;
using std::endl;
using std::string;
int main()
{
//Variables
int hoursworked = 0;
int weeksworked = 0;
int daysworked = 0;
int hoursleft = 0;
string name = "";
//Input
cout << "Enter the name of the worker please: ";
getline(cin, name);
cout << "Enter the total hours worked please: ";
cin >> hoursworked;
//Calculate
.
.
.
.
.
so basically I'm confused on what I'm calculating. reason being is because I need the output to display hours worked in a this format... hours worked is 70, so the output should read 1 week, 3 days, 6 hours. this is assuming the work week is 40 hours with 8 hour days.