954,492 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

pseudocode help

can someone help me create pseudocode. Im writing pseudocode representing a payroll application, this includes over time hours, payrate, tax and social security deductions. I need to now incorporate.................................... Your pay calculation pseudocode must be changed to accept input from a file. You need to read each record from the file, calculate the correct pay and stop as soon as the end of file has been reached. Im totally new to this so don't laugh after reading what I have so far. any help would be greatly appreciated.

Net Pay for hourly employee: Name of Employee =
If hours > 40
Regpay = 40 * payrate
Overtime = (hours – 40) * (payrate * 1.5)
Totalpay = Overtime + Regpay
Else
Totalpay = hours * payrate

//State tax is 6%
//Federal Tax is 15%
//Social security is 7.5 %

Totalpay * (6/100) → take home
Take home * (15/100)→ Take home - Tax
take home - tax * (7.5/100) = Total Take Home
print total take home
Endif

iconz113
Newbie Poster
1 post since May 2009
Reputation Points: 10
Solved Threads: 0
 

i don't know what you need, the pesudo code is your problems which lead to the code !!! or the payroll system itself....

farag
Junior Poster in Training
61 posts since Feb 2008
Reputation Points: 7
Solved Threads: 2
 

Simply tell the story:

open input file
if the file is not opened
   print message
   stop
endif
// read_the_next_record means:
// read hours, payrate, Overtime, Regpay
while read_the_next_record is OK
   ... see OP pseudocode
endloop
close input file

Pseudocode is not a formal language. Your teacher's pseudocode != my pseudocode. For example, I hate Basic-style pseudocodes as yours in OP ;)

See http://en.wikipedia.org/wiki/Pseudocode

ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348
 

but BASIC is just glorified pseudocode, isn't it? :P

jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
 
but BASIC is just glorified pseudocode, isn't it? :P


Exactly! ;)

ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You