This time I write compounding, I use Java to write, there are two functions, one is to calculate the compounding end value based on the principal, and the second is to calculate the required principal based on the final value of compounding, at which point I use two formulas
Enter the final value of the principal: S = P * MATH.POW (1.0 + I, n) that is compounding the final value = Principal * (1+ interest rate) ^ Interest rate acquisition Time
Enter final value for Principal: P = S * MATH.POW (1.0 + I,-n) i.e. required principal = Compound End value * (1+ interest rate) ^ (-interest rate acquisition time)
Running the results in Java is as follows:
1, enter the principal to find the final value
2, enter the final value to seek the principal
First enter 1 in the first input box, and then select the direction of calculation, and then in the corresponding known data input box input, the final result will be displayed in the corresponding result box, to complete the bidirectional evaluation.
One compound interest calculation of software engineering experiment