I was giving the task to make a program with these instructions: Use cmath with the pow function to find the amount when $ 1000 is deposited at 2% compounded quarterly, for 2 years, 5 years, and 10 years. The equation I was also given was:
P = Principal the amount you initially deposit.
r = interest rate as a decimal
n = number of compounding periods per year (example quarterly n = 4, monthly n = 12)
t = number of years.
A = amount you have at end of t years.
I am lost on where to begin. I never made a program with cmath or anything.
The #include<iostream> is a preprocessor order, that allows for output/input from the console. If you are not going to use any couts, which I really doubt, then dont use, otherwise is not too bad to include it always at the beginning of your code.