Northern Virginia Community College - ITP 100ITP 100 homework 4_ Abdelhamid Daoud.
Daoud Abdelhamid Professor: Susan Blackburn Class: ITP 100 Module 2-chapter 4 homework 1. Write pseudocode to calculate the weekly pay for employees. The user will be prompted to enter the number of h ours worked and their job code. Hours in excess of 40 are paid at 1.5 times the hourly pay. Job code hourly rates are: P - $10, Q - $12.50, R - $15.00, and S - $20.00. Use both a case and a selection structure. Global Constant Integer OVERTIME = 40 Global Constant Real OVERTIME_PAY = 1.5 Module main () Call module input Info Call module calc Pay Call module calc Weekly End Module Module input Info () Declare Real hours Worked Declare String job Code Display “Enter the number of hours you worked.” Input hours Worked Display “Enter your job code.” Input job Code End Module Module calc Pay (Real Ref hours Worked, String Ref job Code) Declare Real calc Hours If hours Worked OVERTIME, Then Set calc Hours = OVERTIME_PAY * hours Worked Show Less Show Less
Geschreven voor
- Instelling
- Northern Virginia Community College
- Vak
- ITP 100
Documentinformatie
- Geüpload op
- 8 maart 2023
- Aantal pagina's
- 5
- Geschreven in
- 2022/2023
- Type
- Tentamen (uitwerkingen)
- Bevat
- Vragen en antwoorden
Onderwerpen
-
northern virginia community college itp 100itp 100 homework 4 abdelhamid daoud