SOLUTION AT Australian Expert Writers
Question 01A mobile manufacturing company pays its employees as follows: 1) Team leaders (fixed fortnightly salary)2) Sales workers ($500 plus 6.5% of their gross fortnightly sales)3) Pieceworkers (fixed amount of money per item for each of the items they produce, each piece worker in this company works on only 1 type of item)4) Hourly workers (fixed hourly wage for up to the first 60 hours they work and -timeand a-half- i.e. 1.5 times their hourly wage, for overtime hours worked)Write a program to compute the weekly pay for each employee. You do not know the number of employees in advance.Each type of employee has its own pay code:Code 1: Team leadersCode 2: Sales workersCode 3: PieceworkersCode 4: Hourly workersThere will be an undetermined number of entries into the payroll. Use a switch to compute each employees pay based on that employees pay code. Within the switch, prompt the user (i.e. the payroll clerk) to enter the appropriate facts your program needs to calculate each employees pay based on that employees pay code. Print each pay value and when done with the entries, print total amount of payroll.Sample Run:Enter employees number code (-1 to end): 4Enter hourly workers pay rate: 10 Enter the number of hours worked: 35 fortnightly pay is: 350.00Enter employees number code (-1 to end): 4Enter hourly workers pay rate: 15.5 Enter the number of hours worked: 100 fortnightly pay is: 1860Enter employees number code (-1 to end): 4Enter hourly workers pay rate: 10 Enter the number of hours worked: 40 fortnightly pay is: 400.00Enter employees number code (-1 to end): 1fortnightly pay is: 576.90Enter employees number code (-1 to end): 2 Enter Sales employees gross weekly sales: 1091.45 fortnightly pay is: 570.94Enter employees number code (-1 to end): 3Enter the number of pieces completed: 200 Enter the employees per piece pay rate: 0.5 fortnightly pay is: 100Enter employees number code (-1 to end): 8 You have entered an invalid code.Enter employees number code (-1 to end): 9 You have entered an invalid code.Enter employees number code (-1 to end): 3Enter the number of pieces completed: 100 Enter the employees per piece pay rate:2.75 fortnightly pay is: 275.00Enter employees number code (-1 to end): -1The total payroll for the fortnight is:4132.84Question 02Use the rand function to produce two positive one-digit integers (0 includes). The program should then prompt the user with a question, such as How much is 2 + 3?er. If1. Very good!2. Excellent!3. Nice work!4. Keep up the good work!and ask another addition question.If the answer is wrong, randomly display any of the following messages.1. No. Please try again.2. Wrong. Try once more.3. Dont give up!4. No. Keep trying and let the user try the same question repeatedly until the user finallygets it right.A separate function should be used to generate each new question. This function should be called once when the application begins execution and each time the user answers the question correctly.(Hint: Use random-number generation to choose a number from 1 to 4 that will be used to select one of the four appropriate responses to each correct or incorrect answer. Use a switch statement to issue the responses.)Question 03Question 04Write a complete C program to calculate area and circumference of a circle. Your program should have the following functions in addition to a main() function.1. Menu that displaysDo you want to use radius or diameter for the calculation?Enter 1 for radiusEnter 2 for diameterEnter -1 to exit2. diameter_to_radius receives diameter (double) as a parameter and returns radius (double).3. random_value_generator generates random values (double) between minimum and maximum.4. area receives radius (double) as a parameter and returns area (double).5. circumference – receives radius (double) as a parameter and returns circumference (double).You should start the program by prompting the user to select radius or diameter for the calculation (validate the choice).radius:You should ask the user to choose a unit, either cm or m (validate the choice), for the calculation. Generate a random double value (use random_value_generator) between 5. 0 (minimum) and 15.0 (maximum) for the radius. Prompt the user to choose either area or circumference calculation (prompt by using character A for area and C for circumference validate choice).diameter:You should ask the user to choose a unit, either cm or m (validate the choice), for the calculation. Generate a random double value (use random_value_generator) between 15.0 and 30.0 for the diameter. Before calculating area or circumference convert diameter to radius (use diameter_to_radius function).You should exit the program only when the user inputs -1.All results are printed in main, show only two decimal numbers in the final result.The formatting of the output should be similar (including the units) to the screen shot shown.In this task double means double precision floating point value.
- Assignment status: Already Solved By Our Experts
- (USA, AUS, UK & CA Ph. D. Writers)
- CLICK HERE TO GET A PROFESSIONAL WRITER TO WORK ON THIS PAPER AND OTHER SIMILAR PAPERS, GET A NON PLAGIARIZED PAPER FROM OUR EXPERTS
QUALITY: 100% ORIGINAL PAPER – NO PLAGIARISM – CUSTOM PAPER