Oracle
1Z0-819 · Question #12
1Z0-819 Question #12: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-819 to reveal the answer and full explanation for question #12. The question stem and answer options stay visible for context.
Question
Given this formula to calculate a monthly mortgage payment:
M = P * (i(1+i)^n) / ((1+i)^n - 1)
and these declarations:
double m;
double i = 0.05/12; //monthly interest rate
int p = 100_000; //principal
int n = 180; //number of payments
How can you code this formula?
Options
- Am = p * (Math.pow(1 + r, n) / (Math.pow(1 + r, n) - 1));
- Bm = p * (r * Math.pow(1 + r, n) / (Math.pow(1 + r, n) - 1));
- Cm = p * (r * Math.pow(1 + r, n) / Math.pow(1 + r, n) - 1);
- Dm = p * (r * Math.pow(1 + r, n) / (Math.pow(1 + r, n) - 1));
Unlock 1Z0-819 to see the answer
You've previewed enough free 1Z0-819 questions. Unlock 1Z0-819 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.