Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C++ Only with headers like: #include <iostream> using namespace std; Question: I

ID: 3861147 • Letter: C

Question

C++ Only with headers like:

#include <iostream>
using namespace std;

Question:

I need code written for a retirement saving plan based off of this algorithm.

For most people, employer pensions, government pensions, and the tax situation in their country are important factors, typically taken account of in calculations by actuaries. Ignoring those significant nation-specific factors but not necessarily assuming zero real interest rates, a "not to be relied upon" calculation of required personal savings rate zprop can be made using a little mathematics.[50] It helps to have a dimly remembered acquaintance with geometric series, maybe in the form

1 + r + r2 + r3 + ... + rn1 = (1 rn)/(1 r)

You work for w years, saving a proportion zprop of pay at the end of each year. So the after-savings purchasing power is (1-zprop) of pay while you are working. You need a pension for p years. Let's say that at retirement you are earning S per year and require to replace a ratio Rrepl of your pre-retirement living standard. So you need a pension of (1 – zprop ) Rrepl S, indexed to price inflation.

Let's assume that the investments, after price inflation fprice, earn a real rate ireal in real terms where

(1+ ireal ) = ((1+inominal))/((1+fprice ) ) (Ret-01)

Let's assume that the investments, after wage inflation fpay, earn a real rate i rel to pay where

(1+ i rel to pay ) = ((1+inominal))/((1+fpay ) ) (Ret-02)

Expectations:

The project will have to require loops, arrays and at least one user-defined function. The final solution should be in the range of 100-200 lines of code.

Explanation / Answer

#include using namespace std; int main() { double monthlyPayment; double balance; double interestRate; cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); cout > balance; cout > interestRate; cout > monthlyPayment; while (interestRate >= 1) { interestRate = interestRate / 100; } balance = balance * (1 + interestRate / 12) - monthlyPayment; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote