Question: Write c+ program using codeblocks 1. An auto repair shop charges as follows. Inspecting the vehicle costs $75. If no work needs to be done,
1. An auto repair shop charges as follows. Inspecting the vehicle costs $75. If no work needs to be done, there is no further charge. Otherwise, the charge is $75 per hour for labour plus the cost of parts, with a minimum charge of S120. If any work is done, there is no charge for inspecting the vehicle. Write a program to read values for hours worked and cost of parts (cither of which could be 0) and print the charge for the job. 2. Write a program which requests two weights in kilograms and grams and prints the sum of the weights. For example, if the weights are 3kg 500g and 4kg 700g, your program should print 8kg 200g. 3. Write a program which requests two lengths in feet and inches and prints the sum of the lengths. For example, if the lengths are 5 ft. 4 in. and 8 ft. 11 in. your program should print 14ft. 3 in. ( ft. 12 in.) A variety store give a 15% discount on sales totaling S300 or more. Write a program to request the cost of 3 items and print the amount the customer must pay Write a program to read a person's name, hours worked, hourly rate of pay and tax rate (a number representing a percentage, eg. 25 meaning 25%). The program must print the name, gross pay, tax deducted and net pay 4, 6. Gross pay is calculated by multiplying the rate of pay by the hours worked if the hours worked is less than or cqual to 40. If it is more than 40, all hours above 40 are calculated at 1.5 times the normal rate of pay The tax deducted is calculated by applying the tax rate to 80% of gross pay. And the net pay is calculated by subtracting the tax deducted from the gross pay For example, if the person works 50 hours at S20hour and the tax rate is 25%, his gross pay would be (40 x 20) + ( 10 20 x 1.5)-$1100. He pays 25% tax on 80% of $1 100. that is. 25% of S880-S220. His net pay is 1 100-220-S880. In an English elass, a student is given 3 term tests (marked out of 25) and an end-of-term test (marked out of 100). The end-of-term test counts the same as the 3 term tests in determining the final mark (out of 100). Write a program to read marks for the 3 term tests followed by the mark for the end-of-term test. The program then prints the final mark and an indication of whether the student passes or fails. To pass, the final mark must be 50 or 7. For example, given the data 20 10 15 56, the final mark is calculated by 20+10+15 75 56 x 50100 x 50 58 8. Write a program to read integer values for month and year and print the number of days in the month. For example, 4 2005 (April 2005) should print 30; 2 2004 (February 2004) should print 29 and 2 1900 (February 1900) should print 28. A leap year, n, is divisible by 4; however, if n is divisible by 100 then it is a leap year only if it is also divisible by 400. So 1900 is not a leap year but 2000 is
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
