Write a program that calculates pay for either an hourly paid worker or a salaried worker. Hourly paid workers are paid

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Write a program that calculates pay for either an hourly paid worker or a salaried worker. Hourly paid workers are paid

Post by answerhappygod »

Write a program that calculates pay for either an hourly paidworker or a salaried worker. Hourly paid workers are paid theirhourly pay rate times the number of hours worked. Salaried workersare paid their regular salary plus any bonus they may have earned.The program should declare two structures for the followingdata:
The program should also declare a union with two members. Eachmember should be a structure variable: one for the hourly paidworker and another for the salaried worker.
The program should ask the user whether he or she is calculatingthe pay for an hourly paid worker or a salaried worker. Regardlessof which the user selects, the appropriate members of the unionwill be used to store the data that will be used to calculate thepay.
Input Validation: Do not accept negative numbers. Do not acceptvalues greater than 80 for HoursWorked.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply