-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
31 lines (27 loc) · 914 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!doctype html>
<html>
<head>
<title>GST Calculator</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script>
function gst() {
var numOne, numTwo, divide, sum;
numOne = parseInt(document.getElementById("first").value);
numTwo = parseInt(document.getElementById("second").value);
divide = (numOne * numTwo) / 100;
sum = divide + numOne;
document.getElementById("answer1").value = divide;
document.getElementById("answer2").value = sum;
}
</script>
</head>
<body>
<div class="container">
<p>Original Price <input id="first"></p>
<p>GST % <input id="second"></p>
<button onclick="gst()">Get GST</button>
<p>GST Amount<input id="answer1"></p>
<p>Final Price<input id="answer2"></p>
</div>
</body>
</html>