Hello.
im creating a program that determines payroll and im getting problems debugging it can someone help point out the reasons why im getting errors.
Thank You.
Here's my code so far:
// ConsoleApplication1.cpp : main project file.
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int worker_type, managers = 1, hourlyworkers = 2, commission = 3, pieceworkers = 4;
cin >> "Please enter employee's paycode ";
switch (worker_type)
{
case 1: cout << "Managers weekly pay is $500";
output: ManagersPay;
break;
case 2: cin >> "Please enter the amount of hours worked";
int amthours;
cin >> "Please enter the hourly rate.";
float hourlyrate, pay;
if (amthours < 40) {
pay = hourlyrate * amthours;
}
else pay = amthours * (hourlyrate * 1.5);
cout << "Employee's pay is " << pay;
output: HourlyworkersPay;
break;
case 3: cin >> "Please enter the gross weekly sales made by employee";
float grosssales, pay;
pay = (grosssales * 0.057) + 250;
cout << "Employee's pay is" << pay;
output: CommissionPay;
break;
case 4: cin >> "Please enter the amount the employee is paid per product";
float amtpaid, pay;
cin >> "Please enter the amount of products produced by employee";
int amtproducts;
pay = amtpaid * amtproducts;
cout << "Employee's pay is " << pay;
output: PieceworkersPay;
break;
default:
cout << "No matching worker" << endl;
}