name r1 GROSS PAY
name r2 TAX
name r3 NATIONAL INSURANCE
name r4 TOTAL DEDUCTIONS
name r5 NET PAY
name r6 PAYROLL NUMBER
name r7 NUMBER OF EMPLOYEES
name r8 SUPERANUATION
name r9 TOTAL GROSS
name r10 TOTAL TAX
name r11 TOTAL N.I.
name r12 TOTAL SUPERANUATION
name r13 TOTAL DEDUCTIONS
name r14 TOTAL NET PAY
fix 2
r9 = 0
r10 = 0
r11 = 0
r12 = 0
r13 = 0
r14 = 0
input r7
do r7
input r6 r1
call calc-super
call calc-tax
call calc-ni
call calc-net
r9 = r9 + r1
r10 = r10 + r2
r11 = r11 + r3
r12 = r12 + r8
r13 = r13 + r4
r14 = r14 + r5
print r6 r1 r2 r3 r8 r4 r5
loop
print r10 r11 r12 r13 r14
stop
sub calc-super
r8 = r1 * 0.06
return
sub calc-tax
r15 = r1 - r8
r15 = r15 - 1375
if r15 lt 0
r2 = 0
else
if r15 lt 11251
r2 = r15 * 0.30
else
if r15 lt 13251
r2 = (r15 - 11251) * 0.40 + 3375
else
if r15 lt 16751
r2 = (r15 - 13250) * 0.45 + 4175
else
if r15 lt 22251
r2 = (r15 - 16750) * 0.50 + 5750
else
if r15 lt 27751
r2 = (r15 - 22250) * 0.55 + 8500
else
r2 = (r15 - 27750) * 0.60 + 11525
fend
fend
fend
fend
fend
fend
return
sub calc-ni
r16 = r1 - 1196
r3 = (r16 * 0.0425) + 80.73
return
sub calc-net
r4 = r2 + r3 + r8
r5 = r1 - r4
return
END
sub calc-ni
r16 = r1 - 1196
r3 = (r16 * 0.0425) + 80.73