Hi guys/gals,
I am having an issue with a project I am working on for class. I manage to get everything else working as required but the last part is just killing me.
Here is what I need to get done:
For each quarter, calculate and display the beginning principal balance, the interest earned, and the final principal balance for the quarter.
For example: The user entered 1000.00 for the beginning principal balance, 5.25 for the interest rate, and 8 for the number of quarters. The output from this part of the program should be similar to the following:
Q| Beginning Principle| Interest Earned| End Principle
1| $1,000.00 | $13.13 | $1,013.13
2| $1,013.13 | $13.30 | $1,026.42
3| $1,026.42 | $13.47 | $1,039.89
etc
Here is the code I have so far, and I just am not quite sure where to go next.
Thanks guys for any help you can give me.
Code:
{
cout << "Quarters" << "\t" << "Beginning Principles" << "\t" <<"Interest Earned" << "\t" <<"End Principal" << endl;
endprin = balance + (quarter * interest);
interest = quarter * interest;
cout << endprin << endl;
} |