1 / 6

Pseudocode Demo for Payroll.c

Pseudocode Demo for Payroll.c. Flowchart, Hierarchy Chart and Pseudocode. Flowchart for payroll.c main(). Calculate Wages. A. Begin Payroll. Employee # Not 0 ?. Display Total Wages. No. Open Output File. Yes. Input Payrate & Hours Worked. End Payroll. Initialize

gabrielc
Download Presentation

Pseudocode Demo for Payroll.c

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Pseudocode Demofor Payroll.c Flowchart, Hierarchy Chart and Pseudocode

  2. Flowchart for payroll.c main() Calculate Wages A Begin Payroll Employee # Not 0 ? Display Total Wages No Open Output File Yes Input Payrate & Hours Worked End Payroll Initialize Total = 0 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. Hierarchy Chart for payroll.c main( ) calc_wages( ) A hierarchy chart shows what functions other functions call.

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

More Related