Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<script src="script.js"></script>
<link rel="stylesheet" href="style.css">
<title>Simple Interest Calculator</title>
<script src="script.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Simple Interest Calculator</h1>

Amount <input type="number" id="principal"> <br/>
Rate <input type="number" id="rate"> <br/>
No. of Years <input type="number" id="years"> <br/>
Interest : <span id="result"></span><br>
<form>
<label for="principal">Amount (Principal): </label>
<input type="number" id="principal" placeholder="Enter principal amount" required> <br/><br/>

<label for="rate">Rate of Interest (%): </label>
<input type="number" id="rate" placeholder="Enter rate of interest" required> <br/><br/>

<label for="years">No. of Years: </label>
<input type="number" id="years" placeholder="Enter number of years" required> <br/><br/>

<button type="button" onclick="compute()">Compute Interest</button>
</form>

<h2>Calculated Interest: <span id="result">0</span></h2>

<button onclick="compute()">Compute</button>
</body>
</html>
Loading