Hi,I need to create a payroll program for my project. For the assigment i have to create a payroll calculator for 4 types of employees and then the total pay of the company. I think my code works as expected but i don't how to make the [Q] option to work and display the total pay of the company, any tips?.
#include <iostream>
#include <iomanip>
using std::endl;
int main ()
{
int paycode,
hrsworked;
double pay1,
pay2,
pay3,
pay4,
payperwidget,
widgetsold,
weeklysalary,
hrspayed,
commission,
grossweeklysales,
totalpay;
A few problems:
1) paycode is an int. You can't enter a Q into an int.
2) Recursive calls to main() are not permitted.
3) Line 96, you're trying to return the address of main. I suspect you meant main(), which is still not legal.
PLEASE USE CODE TAGS (the <> formatting button) when posting code. http://v2.cplusplus.com/articles/jEywvCM9/
It makes it easier to read your code and it also makes it easier to respond to your post.
Hint: You can edit your previous post, highlight your code and press the <> formatting button.