0
I can’t make a repeating structure.
Example of what I want to do: I enter the initial value and enter the percentage I want it to increase for 30 days.
Example of starting value: 50. Percentage that increases every day: 10%;
1- R$55,00 (+10%)
2- R$60,50 (+10%)
3- R$66,55 (+10%)
4- ...
var inicial = parseFloat(prompt("Digite o valor inicial:"));
var porcentagem = parseFloat(prompt("Digite a porcentagem diária: \nOBS: 10% = 1.10"));
var calc = parseFloat(inicial * porcentagem).toFixed(2);
document.write(calc + "<br>");
for (var i=0; i<=30; i++) {
var fds = parseFloat(calc * porcentagem).toFixed(2);
document.write(fds + "<br>")
}
Solved perfectly! Thank you very much!
– dududornelees