I have a project for class and I'm stuck. I am no where near finished with the program. nor am I asking anyone to write it for me, I'm just asking for help because I'm stuck. Sorry this thing is so long. Here is what the program is supposed to do.....
You are to write a program that makes use of functions, switch statement(s), and a for loop. The program will include a main function that is a driver only, i.e., it will create/supply data to the function(s) that calculater salaries for the individuals and the companies payroll (all salaries totaled).
The personnel data follows (in the form of Name - Employee ID - Base Salary - Bonus )
Employee One - 101 - 2000 - 1400
Employee Two - 102 - 2000 - 600
Employee Three - 103 - 2000 - 350
Employee Four - 104 - 2000 - 4500
Employee Five - 105 - 2000 - 1500
You may complete this table with a Payed column that will display Salary + Bonus for every employee and below the employees you would supply a "Sum" row. In any event, I want two questions to be answered.
How much do we pay each employee?
What is our payroll?
But our professor has not went over how to make a table, nor have we read that in our book yet. but this is what i have so far, I'm really confused with the switch, I know how it works, but I'm just unsure of what info to put in.
double sumMoney(double baseSalary, double bonus, double sum)
return baseSalary + bonus = sum;
double payroll(double baseSalary, double payRoll)
return (baseSalary * 5) = payRoll;
using namespace std;
int employeeID, baseSalary=2000, bonus, j, n=5;
cout << "Our payroll is: " << payroll(baseSalary, payRoll) << endl;
cout << "Enter the bonus for employee 101: " ;
cin >> bonus;
for(j=1; j<= n; j++)
// Execute this block n times