-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
158 lines (157 loc) · 9.89 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css" media="screen" type="text/css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;500&display=swap" rel="stylesheet">
<link rel="icon" href="assets/icon.png">
<title>You Can't Do Math</title>
</head>
<body>
<div class="container">
<h1>Perform any calculation...</h1>
<table class="pcView">
<tr>
<td colspan="7">
<input readonly type="text" id="display" value=""/>
</td>
</tr>
<tr>
<td><input class="btnBorder" id="btnRad" type="button" name="operator" value="rad" /></td>
<td><input id="btnDeg" type="button" name="operator" value="deg" /></td>
<td><input id="btnFact" type="button" name="operator" value="x!" onclick="set('!')" class="black"/></td>
<td><input id="btnOParen" type="button" name="operator" value="(" onclick="set('(')" /></td>
<td><input id="btnCParen" type="button" name="operator" value=")" onclick="set(')')"/></td>
<td><input id="btnPcnt" type="button" name="operator" value="%" onclick="set('%')" /></td>
<td><input id="btnCE" type="button" name="operator" value="AC" onclick="ac()"/></td>
</tr>
<tr>
<td><input id="btnSineInv" type="button" name="operator" value="asin" onclick="set('arcsin(')" /></td>
<td><input id="btnSine" type="button" name="operator" value="sin" onclick="set('sin(')" /></td>
<td><input id="btnLN" type="button" name="operator" value="ln"onclick="set('In(')" onclick="set('In(')" /></td>
<td><input id="btn7" type="button" value="7" onclick="set('7')" /></td>
<td><input id="btn8" type="button" value="8" onclick="set('8')" /></td>
<td><input id="btn9" type="button" value="9" onclick="set('9')" /></td>
<td><input id="btnDiv" type="button" name="operator" value="÷" onclick="set('/')" /></td>
</tr>
<tr>
<td><input id="btnCosInv" type="button" name="operator" value="acos" onclick="set('arccos(')" /></td>
<td><input id="btnCos" type="button" name="operator" value="cos" onclick="set('cos(')" /></td>
<td><input id="btnLog" type="button" name="operator" value="log" onclick="set('log(')" /></td>
<td><input id="btn4" type="button" value="4" onclick="set('4')" /></td>
<td><input id="btn5" type="button" value="5" onclick="set('5')" /></td>
<td><input id="btn6" type="button" value="6" onclick="set('6')" /></td>
<td><input id="btnMul" type="button" name="operator" value="×" onclick="set('*')" /></td>
</tr>
<tr>
<td><input id="btnTanInv" type="button" name="operator" value="atan" onclick="set('arctan(')" /></td>
<td><input id="btnTan" type="button" name="operator" value="tan" onclick="set('tan(')" /></td>
<td><input id="btnSqrt" type="button" name="operator" value="√" onclick="set('√')" /></td>
<td><input id="btn1" type="button" value="1" onclick="set('1')" /></td>
<td><input id="btn2" type="button" value="2" onclick="set('2')" /></td>
<td><input id="btn3" type="button" value="3" onclick="set('3')" /></td>
<td><input id="btnSub" type="button" name="operator" value="-" onclick="set('-')" /></td>
</tr>
<tr>
<td><input id="btnAns" type="button" name="operator" value="Ans" onclick="set('Ans')"/></td>
<td><input id="btnPi" type="button" name="operator" value="π" onclick="set('3.14')" /></td>
<td><input id="btnE" type="button" name="operator" value="e" onclick="set('e')"/></td>
<td><input id="btn0" type="button" value="0" onclick="set('0')" /></td>
<td><input id="btnPeriod" type="button" value="." onclick="set('.')"/></td>
<td><input id="btnEqual" type="button" name="equal" value="=" onclick="answer()" class="red" /></td>
<td><input id="btnAdd" type="button" name="operator" value="+" onclick="set('+')" /></td>
</tr>
<tr>
<td colspan="2" >
<button id="btnspan2" class="operator" onclick="ac()">
<img src="assets/reset.svg" />
</button>
</td>
<td></td>
<td></td>
<td></td>
<td colspan="2" >
<button id="btnspan2" class="operator" onclick="ce()">
<img src="assets/back.svg" />
</button>
</td>
</tr>
</table>
<div class="mobileView">
<input readonly type="text" id="display-mobile" value="" />
<button class="operator e1 active">123</button>
<button class="operator e2">Fx</button>
<table class="table1">
<tr>
<td><input id="btnOParen" type="button" name="operator" value="(" onclick="set('(')" /></td>
<td><input id="btnCParen" type="button" name="operator" value=")" onclick="set(')')" /></td>
<td><input id="btnPcnt" type="button" name="operator" value="%" onclick="set('%')"/></td>
<td><input id="btnCE" type="button" name="operator" value="AC" onclick="ac()" /></td>
</tr>
<tr>
<td><input id="btn7" type="button" value="7" onclick="set('7')" /></td>
<td><input id="btn8" type="button" value="8" onclick="set('8')" /></td>
<td><input id="btn9" type="button" value="9" onclick="set('9')" /></td>
<td><input id="btnDiv" class="op" type="button" name="operator" value="÷" onclick="set('/')" /></td>
</tr>
<tr>
<td><input id="btn4" type="button" value="4" onclick="set('4')" /></td>
<td><input id="btn5" type="button" value="5" onclick="set('5')" /></td>
<td><input id="btn6" type="button" value="6" onclick="set('6')" /></td>
<td><input id="btnMul" class="op" type="button" name="operator" value="×" onclick="set('*')" /></td>
</tr>
<tr>
<td><input id="btn1" type="button" value="1" onclick="set('1')" /></td>
<td><input id="btn2" type="button" value="2" onclick="set('2')" /></td>
<td><input id="btn3" type="button" value="3" onclick="set('3')" /></td>
<td><input id="btnSub" class="op" type="button" name="operator" value="-" onclick="set('-')" /></td>
</tr>
<tr>
<td><input id="btn0" type="button" value="0" onclick="set('0')" /></td>
<td><input id="btnPeriod" type="button" value="." onclick="set('.')"/></td>
<td><input id="btnEqual" type="button" name="equal" value="=" onclick="answer()"/></td>
<td><input id="btnAdd" class="op" type="button" name="operator" value="+" onclick="set('+')" /></td>
</tr>
</table>
<table class="table2 hide">
<tr>
<td><input class="btnBorder" id="btnRadM" type="button" name="operator" value="rad" /></td>
<td><input id="btnDegM" type="button" name="operator" value="deg" /></td>
<td><input id="btnFact" type="button" name="operator" value="x!" onclick="set('!')" class="black"/></td>
<td><input id="btnLN" type="button" name="operator" value="ln" onclick="set('In(')" /></td>
</tr>
<tr>
<td><input id="btnSineInv" type="button" name="operator" value="asin" onclick="set('arcsin(')" /></td>
<td><input id="btnSine" type="button" name="operator" value="sin" onclick="set('sin(')" /></td>
<td><input id="btnCosInv" type="button" name="operator" value="acos" onclick="set('arccos(')" /></td>
<td><input id="btnCos" type="button" name="operator" value="cos" onclick="set('cos(')" /></td>
</tr>
<tr>
<td><input id="btnLog" type="button" name="operator" value="log" onclick="set('log(')"/></td>
<td><input id="btnSqrt" type="button" name="operator" value="√" onclick="set('√')" /></td>
<td><input id="btnTanInv" type="button" name="operator" value="atan" onclick="set('arctan(')" /></td>
<td><input id="btnTan" type="button" name="operator" value="tan" onclick="set('tan(')" /></td>
</tr>
<tr>
<td><input id="btnAns" type="button" name="operator" value="Ans" onclick="set('Ans')"/></td>
<td><input id="btnPi" type="button" name="operator" value="π" onclick="set('3.14')" /></td>
<td><input id="btnE" type="button" name="operator" value="e" onclick="set('e')"/></td>
<td><input id="btnEqual" class="op" type="button" name="equal" value="=" onclick="answer()" /></td>
</tr>
</table>
<div class="btnelements">
<button id="btnspan2" class="operator" onclick="ac()"><img src="assets/reset.svg" />
</button>
<button id="btnspan2" class="operator" onclick="ce()"><img src="assets/back.svg" />
</button>
</div>
</div>
<h2 class="genText"></h2>
</div>
<script src="script.js"></script>
</body>
</html>