Click here to Skip to main content
15,918,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
About the headers... Yes, they should be enough, by the way... if not, the compiler will give you an error like "function not recognised" or give unnespected errors. (Sorry that my answer is not more concrete, many years without coding in c++, don't remember all headers)

Pathetic wrote:
how do you do that??


From you first message:

Pathetic wrote:


hours worked 42.00

Regular pay 240.00
Overtime pay 31.50
---------------------
Total Gross Pay 451.50


Regular pay = temp1
Overtime pay = temp2 + temp3

total gross pay = temp1 + temp2 + temp3


you don't need to use more variables. So you can put it as you did with the second part (taxes)

cout<<"Total Gross pay = " << temp1+temp2+temp3 <<endl;


Ah, and check out the << >> in your code, in the taxes part you have typos be the "endl" and, on the second and third taxes you don't need to use 100.0 because you already have decimals in the other coeficients. Only in the first 31% were all ints.


P.S. Sorry about the delayment, hope it is not too late.

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 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 
QuestionRe: Windows upgradation problem Pin
David Crow27-May-08 6:54
David Crow27-May-08 6:54 
AnswerRe: Windows upgradation problem Pin
led mike27-May-08 8:27
led mike27-May-08 8:27 

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.