Click here to Skip to main content
15,914,386 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralTe: employee pay calculator Pin
Pathetic28-May-08 12:04
Pathetic28-May-08 12:04 
GeneralRe: Te: employee pay calculator Pin
gbeez29-May-08 4:14
gbeez29-May-08 4:14 
GeneralRe: employee pay calculator Pin
Nelek1-Jun-08 7:43
protectorNelek1-Jun-08 7:43 
GeneralRe: employee pay calculator Pin
gbeez3-Jun-08 4:53
gbeez3-Jun-08 4:53 
GeneralRe: employee pay calculator Pin
Pathetic3-Jun-08 14:03
Pathetic3-Jun-08 14:03 
GeneralRe: employee pay calculator Pin
Nelek3-Jun-08 21:34
protectorNelek3-Jun-08 21:34 
GeneralRe: employee pay calculator [modified] Pin
Pathetic28-May-08 12:07
Pathetic28-May-08 12:07 
GeneralRe: employee pay calculator Pin
Nelek1-Jun-08 7:38
protectorNelek1-Jun-08 7:38 
You are declaring all variables as ints, and it is false. Many of them will efford floats because they need decimals

I would initialize the variables.
int a = 0, b = 0, c = 0;
float d = 0.0, e = 0.0;


Do you want the user to introduce the price of one hour? Or make it constant? If first... you have forgotten to ask for it. If second you have forgotten to give a value.
If first, you will be able to make different calculations using same ratios (1x, 1.5x and 2x) for different hour_prices. If second... I would declare it as a CONSTANT
#define HPRICE 10.5


Watch out with the ; at the end of the code lines (you are missing some), and with the << >> of "endl"

cout<<"The Net pay for the week is "<< neto_pay = total_pay - taxes - cpp - ei - ud << endl
you don't need to assign the value just put the sume or substraction without the left side of ecuation.

Greetings.
--------
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.

GeneralRe: employee pay calculator [modified] Pin
Pathetic28-May-08 12:29
Pathetic28-May-08 12:29 
GeneralRe: employee pay calculator Pin
Nelek1-Jun-08 7:28
protectorNelek1-Jun-08 7:28 
GeneralRe: employee pay calculator Pin
Pathetic7-Jun-08 6:18
Pathetic7-Jun-08 6:18 
QuestionMatch USB Printer to friendly name Pin
gbeez27-May-08 9:30
gbeez27-May-08 9:30 
AnswerRe: Match USB Printer to friendly name Pin
gbeez28-May-08 2:59
gbeez28-May-08 2:59 
GeneralRe: Match USB Printer to friendly name Pin
gbeez10-Jun-08 12:04
gbeez10-Jun-08 12:04 
QuestionTracking Download Programatically Pin
Knight Rider27-May-08 8:39
Knight Rider27-May-08 8:39 
QuestionRe: Tracking Download Programatically Pin
David Crow27-May-08 9:43
David Crow27-May-08 9:43 
AnswerRe: Tracking Download Programatically Pin
Knight Rider27-May-08 11:25
Knight Rider27-May-08 11:25 
QuestionRe: Tracking Download Programatically Pin
David Crow27-May-08 15:55
David Crow27-May-08 15:55 
AnswerRe: Tracking Download Programatically Pin
led mike27-May-08 10:57
led mike27-May-08 10:57 
QuestionDisk Info Pin
john563227-May-08 7:01
john563227-May-08 7:01 
AnswerRe: Disk Info Pin
Jijo.Raj27-May-08 7:19
Jijo.Raj27-May-08 7:19 
GeneralRe: Disk Info Pin
Xeqtr27-May-08 8:27
Xeqtr27-May-08 8:27 
AnswerRe: Disk Info Pin
SandipG 27-May-08 18:37
SandipG 27-May-08 18:37 
GeneralRe: Disk Info Pin
Xeqtr27-May-08 22:55
Xeqtr27-May-08 22:55 
QuestionWindows upgradation problem Pin
problemfixer27-May-08 6:52
problemfixer27-May-08 6:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.