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

C / C++ / MFC

 
GeneralRe: employee pay calculator Pin
gbeez28-May-08 11:21
gbeez28-May-08 11:21 
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 
thanks for your help! how is this so far.

#include <iostream>
#include <iomanip>
using namespace std;

void main()
{//start

int hours_worked,
total_pay,
neto_pat,
taxes,
cpp,
ei,
ud


cout<<"Please enter hours worked"<<endl;
cin>>hours_worked;

if (hours_worked is =< 40)
(hours_worked*hour_price)
else if (hours_worked is >40 <= 45)
(45-hours_worked) * (1.5*hour_price)


else if(hours_worked >45)
(hours_worked - 45) * (2*hour_price)


save the total amount in a "total_pay"
give the results on the screen /* depending on how you mix the three temp variables you have one amount or the other */


cout<<"Deductions Are"<<endl;
cout<<"Taxes ="<< (total_pay * 31) / 100.0 >>endl; /* this .0 at the end is to force to have decimals in the result */
cout<<"CPP ="<< (total_pay * 2.4) / 100.0 >>endl;
cout<<"EI ="<< (total_pay * 1.9) / 100.0 >>endl;
cout<<"Union ="<< (total_pay * 0.4) / 100 >>endl;

cout<<"The Net pay for the week is"<< neto_pay = total_pay - taxes - cpp - ei - ud <<endl;
cout<<"The Gross income is"<< total_pay <<endl;

system ("PAUSE");
}


I have a few questions, but they are in latter posts. oh, and yes, i did paste what you gave me, then worked overtop of it, it takes less time that way, and Icopy and paste stuff. the stuff that is identicle to yours dont just look identicle they are identicle. those are the bits i didnt get.

"The beauty of grace is that it makes life unfair" Relient K, Be my escape

modified on Wednesday, May 28, 2008 8:22 PM

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 
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 

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.