Using a structure, and creating three structure variables; write a program that will calculate the total pay for thirty

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: 899603
Joined: Mon Aug 02, 2021 8:13 am

Using a structure, and creating three structure variables; write a program that will calculate the total pay for thirty

Post by answerhappygod »

Using A Structure And Creating Three Structure Variables Write A Program That Will Calculate The Total Pay For Thirty 1
Using A Structure And Creating Three Structure Variables Write A Program That Will Calculate The Total Pay For Thirty 1 (88.42 KiB) Viewed 16 times
Using A Structure And Creating Three Structure Variables Write A Program That Will Calculate The Total Pay For Thirty 2
Using A Structure And Creating Three Structure Variables Write A Program That Will Calculate The Total Pay For Thirty 2 (83.54 KiB) Viewed 16 times
Using a structure, and creating three structure variables; write a program that will calculate the total pay for thirty (30) employees. (Ten for each structured variable.) Sort the list of employees by the employee ID in ascending order and display their respective information. Description Employee IDs Hours Worked Pay Rate Total Pay Structure name administrative office field DataType of INT of DOUBLE of DOUBLE of Double payroll structure variable structure variable structure variable Members employees jd hrworked jd payrate jd total_pay_jd Array Size 10 10 10 Excluding the main function, your program should have four additional functions that will get the hours worked, and payrate, calculate the total pay, sort the data and display your output. Base pay should be calculated by multiplying the regular hours worked by pay rate. If a person has worked over forty (40)hours, total pay is calculated by an adding 10% of base pay for every five (5) hours over forty (40) to base pay. (ie a person working 50 hours with a total pay of $100 would have ((hours-40)/5)*(base pay.1) + base pay. Note: id represents the initials of the programmer. Your function names should
Base pay should be calculated by multiplying the regular hours worked by pay rate. If a person has worked over forty (40)hours, total pay is calculated by an adding 10% of base pay for every five (5) hours over forty (40) to base pay. (ie a person working 50 hours with a total pay of $100 would have ((hours-40)/5)*(base pay*.1) + base pay. Note: jd represents the initials of the programmer. Your function names should be named by replacing the initials jd with your first and last initials Name of function Properties of function Definition of Function Read Input File get_jd Called from main Should pass hours worked and pay rate + Calculate Pay calc_jd Called from main Should pass hours worked and pay rate and calculated total pay Sort Data sort_jd Called from main Sort data by student ID using the bubble or selection sort; passing all variables Output Results prt_jd Called from main Should pass employee id, hours worked, pay rate and total pay. Then print the data.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply