-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
35 lines (35 loc) · 1.42 KB
/
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
32
33
34
35
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculator</title>
<link rel="stylesheet" href="calc.css">
</head>
<body>
<div class="calculator">
<input type="text" id="result" readonly>
<br>
<input type="button" value="7" onclick="appendNumber('7')">
<input type="button" value="8" onclick="appendNumber('8')">
<input type="button" value="9" onclick="appendNumber('9')">
<input type="button" value="/" onclick="appendOperator('/')">
<br>
<input type="button" value="4" onclick="appendNumber('4')">
<input type="button" value="5" onclick="appendNumber('5')">
<input type="button" value="6" onclick="appendNumber('6')">
<input type="button" value="*" onclick="appendOperator('*')">
<br>
<input type="button" value="1" onclick="appendNumber('1')">
<input type="button" value="2" onclick="appendNumber('2')">
<input type="button" value="3" onclick="appendNumber('3')">
<input type="button" value="-" onclick="appendOperator('-')">
<br>
<input type="button" value="0" onclick="appendNumber('0')">
<input type="button" value="." onclick="appendDecimal()">
<input type="button" value="=" onclick="calculate()">
<input type="button" value="+" onclick="appendOperator('+')">
<br>
<input type="button" value="C" onclick="clearDisplay()">
</div>
</body>
</html>