I would like to know on how to solve this particular equation.

Create 4 functions
Main function
Get number of employees (less than 10)
Get employees hourly salary
Store in an floating point array called salaries
Calls calculate pay function
Calls print pay function number_of_employee_times
Calls print pay function 2 to finish the report
Calculate pay function
Gets passed the number of hours
Returns the overtime + regular pay
Print pay function 1 – called printpay
Gets passed number of employees and results from pay function
Prints “employee # made “ $results from pay function
Does not return anything (void)
Print pay function 2 – still called printpay
Only gets passed one parameter – the total pay for all of the employees
Prints “the company owes $$ in payroll”

This is what I get due to the limited time I have to work in C++. I was wondering how you guys can improve it, follow the guidelines that are above, it would be greatly appreciated.

#include <iostream>
#include <iomanip>
using namespace std;

// Get number of employees (less then 10)
// Get their hourly salaries

int main()

	int numemployees;
	int hourlysalary;
	double pay;

	// Get number of employees (less then 10)
	cout << "How many employees are their?\n";
	cin >> numemployees;
	while (numemployees < 1 || numemployees > 10);

	for (int employee = 1; employee <= numemployees; employee++)
		pay = 0;
		cout << "Enter the salary of employee " << employee << ": ";
		cin >> hourlysalary;

	system ("pause");
	return 0;

Are you saying that you don't have the time to do your own homework but you want someone else to find the time to do it for you?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.