I'm trying to do a compound interest exercise and I have this code that follows so far.
public class ExDesafio_Aula1 {
public static void main(String[]args){
double investimento = 5000.00;
double juros = 0.01;
double valorFinal = investimento * (1 + juros) * 12;
System.out.println(valorFinal);
}
}
The problem is that at the end of the account, it should raise the value in parentheses by 12, and not multiply it.
How do I solve this problem?