(3) noating-point fraction numbers ost processors handle fraction numbers using
ID: 3883097 • Letter: #
Question
(3) noating-point fraction numbers ost processors handle fraction numbers using a different set of instructions (different from integers), called floating-point instructions". The third program calculates the number fixed-monthly-payments for loans using floating-point instructions in a MIPS R-3000 processor. One way to calculate the monthly interest for a loan is as follows: For the following loan: Principal: $3,000.00 Monthly payment:$100.00 Annual interest rate: 6.72% When the first (monthly) payment was made, its interest is calculated as follows: The monthly interest - (prineipal) Cemual interest rate) * (30 days)(365 days) = $3,000 × 0.0672 x 0.08219 = $16.57 Then, the amount for paying to the principal is calculated by subtracting the monthly interest from your monthly payment as follows: The amount for paying to the principal $100.00-$16.57 $83.43 After the first monthly payment, the principal will be: The remaining principal- $3,000-$83.43 = $291 6.57 The above process of the monthly payments will be repeated until the principal becomes S0.00. The number of repeats in the process is the number of monthly payments before we complete the payments for the loan. For example, the above load needs a total of 33 monthly payments to complete the loan, while the total interest paid is $289.02 (we pay a total of $3,289.02). Your program should prompt the following three inputs after it starts in the order described next. The first one is the principal ($100.00 to $1,000,000.00). The second input is the annual interest rate (0.005 (0.5%) to 0.399 (39.9%), The third input is monthly payment amount ($1.00 to $2,000.00). The check to see if the monthly payment does not exceed the principal is NOT necessary (to simplify this project). Just like the other two programs in this project, any invalid input should be detected and they should be repeated until a valid input is made. Any valid input that has been made should not be re-prompted when an invalid input is made for other inputs. Sample outputs for a case (principal-S3,000.00 monthly payment-S100.00 and 6.72% annual interest rate:Explanation / Answer
Image wasnot visible kindly provide question in text format or provide high quality image
Thanking You
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.