Additional Variables :
totalPrincipal: Tracks the total amount invested by the user over the years.totalInterest: Tracks the cumulative interest earned over the years.totalAmount: Tracks the total maturity value (Principal + Interest).Percentage Calculation :
Result Display :
If you invest ₹1,00,000 annually for 15 years at an interest rate of 7.1%, the output will look like this: