Design an algorithm for each of the following problems. Allalgorithms in this lab should include input steps, processing steps(e.g. steps performing calculations) and output steps.
The retirement account of each employee in a company receivesmoney from two sources each month. First, each employee contributes6% of his salary to his own retirement account. Second, the companyalso makes a contribution equal to 3 % of the employee’s salary tothe account. For example, suppose the monthly salary of an employeeis $2000. The employee’s own contribution will be $120, while thecompany’s contribution will be $60. They need a program to managethe retirement accounts. The user will enter the monthly salary ofan employee. The program will calculate and display the followingitems: amount of money contributed by the employee each month,amount of money contributed by the company each month, totalcontribution each month (i.e. the sum of employee’s and company’scontributions). Use 6% and 3% directly in the algorithm tocalculate employee’s and company’s contributions. There is no needto ask the user to enter these rates.
All jackets in a store are on sale now. They need a program toprocess discounts. The user will enter the original price of ajacket and the discount percentage using a decimal (for example: ifit is 25% off, the user should enter 0.25; if it is 30% off, theuser should enter 0.30, etc). The program will use the originalprice and the discount percentage entered by the user to calculatethe sale price (i.e. the reduced price). It will all calculatesales tax and total amount due. Use 0.07 as sales tax rate. Thereis no need to ask the user to enter sales tax rates. Display saleprice, sales tax and total amount due.
A group of high school students are selling pizzaand soda during a basketball game to raise fund for a field trip.Pizza is $3.50 per slice and soda is $1.25 per cup. Design aprogram to do the following. Ask the user to enter number of cupsof soda and number of slices of pizza ordered by the customer. Theprogram will calculate and display the total amount due from thecustomer.
A company is sending its employees to receivingtraining on some new equipment. The training includes two parts:part A and part B. The cost for attending part A is $100 while thecost for part B is $150. There are three options for eachattendee:
Option A: Attend part A only
Option B: Attend part B only
Option C: Attend both part A and partB
Attendeeswho choose option C get a 20% discount. Write a program tocalculate how much training fee the company needs to pay in total.The program should ask the user to enter the number of people whochoose option A, option B and option C, respectively. It willcalculate and display the total training fee the company needs topay.