3
[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. Whereas this interest rate increases 0.025% per month, so store in vectors, with 12 elements each:
- The value of interest rates in each month
- The value of interest in each month
- And the application value corrected each month
After that, show the initial value of the application and the contents of vectors.
How do I do this program? I’m not able to do for the rate of interest 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;
}
Has anyone answered your question? If yes, mark as answered
– Jefferson Quesado