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

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

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

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

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

Exactly! ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.