[Engelbrecht et al., 2012] Develop a program that receives from the user, the value of an application and the value of the initial interest rate. Considering that this interest rate increases by 0.025% per month, then store in vectors with 12 elements each:
The value of interest rates each month The amount of interest in each month And the application value corrected each month After this, show the initial application value and the contents of the vectors.
How do I do this program? I can not do it for the interest rates will increase.
* Ex: Month 1 = 0.025%, Month 2 = 0.050%, Month 3 = 0.075%.
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
int vetor[12];
float apini;
float txjini;
int num;
int main(int argc, char** argv) {
cout<<"Informe o valor da aplicacao inicial: "<<endl;
cin>>apini;
cout<<"Informe o valor da taxa de juros inicial: "<<endl;
cin>>txjini;
for(int i = 0; i<=12; i++)
{
txjini = (vetor[i]*0,025);
cout<<"O valor das taxas de juros em cada mes e de: "<<txjini<<endl;
}
return 0;
}