Skip to content

ICG58/ASSIGNMENT-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Prompt 2:

Ayesha Beauty Creation has human resource department like employees who responsible for running the business activities. Labors are shared among employees like some are on production of products, some are on sales and marketing and some are delivering products to customers.

Employees are paid depending on the hours they worked. If the hours worked are less than or equal to 45 it’s normal hours and the normal HoursWorked amount is N$40.50 per hour. If the hours exceeded 45 than it’s overtime hours and the overtime HoursWorked amount is N$55.00 per overtime hours.

Following is the program that calculate and display employee’s weekly salary

Start

  1.   PROMPT for  HoursWorked
    
  2.   GET HoursWorked
    
  3.   #Normal HoursWorked = HoursWorked – Overtime HoursWorked
    
  4.   GET normal HoursWorked
    
  5.   IF HoursWorked = 45 per day 
    
  6.   THEN weekly salary =  normal HoursWorked × normal HoursWorked amount
    
  7.   Get the weekly salary
    
  8.   If else  HoursWorked > 45 per day then overtime HoursWorked = total HoursWorked – normal HoursWorked
    
  9.   Get overtime HoursWorked
    
  10.   Overtime HoursWorked total amount = overtime HoursWorked × overtime HoursWorked amount
    
  11. Get overtime HoursWorked total amount

  12. Normal HoursWorked amount = normal HoursWorked × normal HoursWorked amount

  13. Get the normal HoursWorked total amount

  14. Weekly salary = overtime HoursWorked total amount + normal HoursWorked total amount

End if

  1. Get weekly salary

End

Josure Amunyela is an employee at Ayesha Beauty Creation and he worked for 48 and he got paid N$ 55.00 for overtime HoursWorked per day and N$ 40.50 for normal HoursWorked per day. Write a program that calculate a weekly salary. Give weekly salary as the output.

Total HoursWorked = 48 hours

Normal HoursWorked = 45 hours

Overtime HoursWorked = 3 hours

Normal HoursWorked amount = N$ 1822.50

Overtime HoursWorked amount = N$ 165.00

Weekly salary = N$ 1987.50 Expected output

START

  1.   Prompt for total HoursWorked
    
  2.   48 hours
    
  3.   Normal HoursWorked = 48 hours – 3 hours
    
  4.   Get 45 hours
    
  5.   If total HoursWorked = 45 then, weekly salary =  45hours × N$ 40.50
    
  6.   Get N$ 1822.50
    
  7.   If else HoursWorked > 45 then, overtime HoursWorked = 48 hours – 45 hours
    
  8.   Get 3 hours
    
  9.   Overtime HoursWorked amount = 3 hours × N$ 55.00
    
  10. Get N$ 165.00

  11. Normal HoursWorked amount = 45 hours × N$ 40.50

  12. Get N$ 1822.50

  13. Weekly salary = N$ 1822.50 + N$ 165.00

End if

  1. Get N$ 1987.50

END

About

Solution ideas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors