-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
77 lines (66 loc) · 3.7 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
<link rel="stylesheet" href="styles.css">
<title>Scientific Calculator</title>
</head>
<body>
<div id="icon">
<i class="fa-solid fa-moon"></i>
</div>
<div class="container">
<div class="calculate">
<input id="screen" type="text" placeholder="0">
<input id="ans" type="text">
<div class="buttons">
<button class="btn" id="ce" onclick="clr()">C</button>
<button class="btn" onclick="oper('!')">x!</button>
<button class="btn" onclick="oper('^(')">^</button>
<button class="btn" onclick="insert('(')">(</button>
<button class="btn" onclick="oper(')')">)</button>
<button class="btn" id="ac" onclick="backspc()"><i class="fa-solid fa-delete-left"></i></button>
<button class="btn" onclick="oper('x2^(')">2<sup>x</sup></button>
<button class="btn" onclick="oper('x10^(')">10<sup>x</sup></button>
<button class="btn" onclick="oper('xe^(')">e<sup>x</sup></button>
<button class="btn" onclick="insert('1/')">1/x</button>
<button class="btn" onclick="insert('abs(')">|x|</button>
<button class="btn" onclick="oper('%')">%</button>
<button class="btn" onclick="insert('sin(')">sin</button>
<button class="btn" onclick="insert('cos(')">cos</button>
<button class="btn" onclick="insert('tan(')">tan</button>
<button class="btn" onclick="insert('π')">Π</button>
<button class="btn" onclick="insert('e')">e</button>
<button class="btn" onclick="oper('/')">÷</button>
<button class="btn" onclick="rad()">Rad</button>
<button class="btn" onclick="deg()">Deg</button>
<button class="btn" id="seven" onclick="insert('7')">7</button>
<button class="btn" id="eight" onclick="insert('8')">8</button>
<button class="btn" id="nine" onclick="insert('9')">9</button>
<button class="btn" onclick="oper('*')">×</button>
<button class="btn" onclick="log()">log</button>
<button class="btn" onclick="ln()">ln</button>
<button class="btn" id="four" onclick="insert('4')">4</button>
<button class="btn" id="five" onclick="insert('5')">5</button>
<button class="btn" id="six" onclick="insert('6')">6</button>
<button class="btn" onclick="oper('-')">-</button>
<button class="btn" onclick="sq()">x<sup>2</sup></button>
<button class="btn" onclick="sq_rt()">√x</button>
<button class="btn" id="one" onclick="insert('1')">1</button>
<button class="btn" id="two" onclick="insert('2')">2</button>
<button class="btn" id="three" onclick="insert('3')">3</button>
<button class="btn" onclick="oper('+')">+</button>
<button class="btn" onclick="cb()">x<sup>3</sup></button>
<button class="btn" onclick="cb_rt()"><sup>3</sup>√x</button>
<button class="btn" onclick="sign()">+/-</button>
<button class="btn" id="zero" onclick="insert('0')">0</button>
<button class="btn" onclick="insert('.')">.</button>
<button class="btn" id="equal" onclick="solve()">=</button>
</div>
</div>
<script src="script.js"></script>
</body>
</html>