<a href="https://beta.publishers.adsterra.com/referral/r4pgaHGQkf"><img alt="banner" src="https://landings-cdn.adsterratech.com/referralBanners/png/300%20x%20250%20px.png" /></a> here's an example of a simple HTML page with JavaScript code for a PPF (Public Provident Fund) Remember that this is a simple example for demonstration purposes. In a real-world application, you might want to add more features, validation, and error handling. that takes input for the number of years and the interest rate
<!DOCTYPE html>
<html>
<head>
<title>PPF Calculator</title>
</head>
<body>
<h1>PPF Calculator</h1>
<label for="years">Enter Number of Years:</label>
<input type="number" id="years" min="1" step="1" required><br><br>
<label for="interestRate">Enter Interest Rate (%):</label>
<input type="number" id="interestRate" min="0" step="0.01" required><br><br>
<button onclick="calculatePPF()">Calculate</button>
<p id="result"></p>
<script>
function calculatePPF() {
var years = parseFloat(document.getElementById("years").value);
var interestRate = parseFloat(document.getElementById("interestRate").value);
var principal = 100000; // You can change the initial investment amount
var interest = principal * (interestRate / 100);
var maturityAmount = principal + (years * interest);
document.getElementById("result").innerHTML = "Maturity Amount after " + years + " years: " + maturityAmount.toFixed(2);
}
</script>
</body>
</html>