Presentation is loading. Please wait.

Presentation is loading. Please wait.

Pseudocode Demo for Payroll.c

Similar presentations


Presentation on theme: "Pseudocode Demo for Payroll.c"— Presentation transcript:

1 Pseudocode Demo for Payroll.c
Flowchart, Hierarchy Chart and Pseudocode

2 Flowchart for payroll.c main()
Begin Payroll Employee # Not 0 ? Display Total Wages No Open Output File Yes Input Payrate & Hours Worked End Payroll Initialize Total = 0 Calculate Wages Increment Total Wages Clear Screen Get Employee Number Output Employee Data Input Next Employee # A

3 Flowchart for payroll.c calc_wages()
Begin calc_wages Pass in Payrate and Hours Overtime ? Yes No Calc Wages with Overtime Calc Wages without Overtime End calc_wages

4 main( ) calc_wages( ) Hierarchy Chart for payroll.c
A hierarchy chart shows what functions other functions call.

5 (subroutine or function)
Flowchart Symbols input/output symbol processing symbol start or stop symbol connector symbols module (subroutine or function) symbol decision symbol

6 Pseudocode for Payroll Program
begin main open output file initialize total and employee number to 0 clear screen get employee number while (employee number not 0) input payrate and hours worked <calculate wages> increment total wages output employee data input next employee number endwhile display total wages end main begin calc_wages(payrate, hours worked) if (hours worked > 40) wages = (40 * payrate) + (hours worked - 40) * payrate * overtime multiplier else wages = hours worked * payrate endif return (wages) end calc_wages


Download ppt "Pseudocode Demo for Payroll.c"

Similar presentations


Ads by Google