It is a school exercise on the use of c ++ fixes, although I can not understand how to make the exercise show tabulation of the month and the accumulated total and the total accumulated profit at the end of the term.
-----------------------------------------------------
% mensual| *monto ingresado por usuario (ej. %2.0) |
-----------------------------------------------------
| mes | cantidad | total acumulado |
-----------------------------------------------------
enero | 1000 | 1000
febrero | | 1020
1040
.... and so on consecutively until December
The problem is:
A person wants to invest a certain amount of money (for example $ 1000.00) in the bank, which gives a certain percentage of monthly interest (for example 2.0%).
The person wants to know what the amount of money will be after a year if all the money is reinvested. (Tip: consider each month as a counter that increases by 1 each time the cycle is repeated).
At the end you should print on the screen the total balance with the interest percentage (in this case 2%) of each month and your profit obtained at the end of the term (in this example 1 year = 12 months).
The code to enter variables as amount of investment, term, monthly interest of execution is:
#include<iostream>
using namespace std;
#define SIN_TIPO string
int main() {
float capital;
float ganancia;
float porcentaje;
int plazo;
cout << " ingrese el capital" << endl;
cin >> capital;
cout << "ingrese porcentajem ensual" << endl;
cin >> porcentaje;
cout << "ingrese plazo" << endl;
cin >> plazo;
ganancia = capital*porcentaje;
cout << "La ganancia es:" << ganancia << endl;
return 0;
}
Any advice?