Thursday, January 22, 2015

Lab 8

NASA Consultant Co Ltd wants to develop a program that can help the consultant to give advice regarding the home loan. The program receives four inputs from the consultant, which are the amount of House Cost in Ringgit Malaysia and years of term applied. Based on these two inputs, program should be able to calculate the monthly repayment. The table for the interest calculation is provided as follows:

Year >= 25, interest 7.5%
Year >= 20, interest 6.5%
Year >= 15, interest 5.5%
Year >= 10, interest 4.5%
Year < 10, interest 4.0%

The formulas for the monthly repayment calculation are as follows:
Interest (RM) = interest (%) x house cost (RM)
House cost with interest = house cost (RM) + interest (RM)
Monthly repayment = house cost with interest / (year of term applied x 12)


YSM Co Ltd is one of the promotion companies. This company wants you to develop a program to help up in calculating the bonus for its employees. The bonus will be calculated based on the sales of the employee and monthly salary. Your program should be able receive two inputs from user, which are sales in Ringgit Malaysia and Monthly Salary. This program should therefore be able to calculate and display the bonus to the user. The table for the bonus rate and index for monthly salary is provided as follows:

The formulas for calculation are as follows:
Bonus based on sales = sales (RM) x bonus (%)
Bonus (RM) = (Monthly salary x index) + bonus based on sales




No comments:

Post a Comment