repl.it
@timmy_i_chen/

calculator starter

HTML, CSS, JS

No description

fork
loading
Files
  • index.html
  • script.js
  • style.css
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
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>Calculator</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    <div class="calc-wrapper">
      <div class="input">
        <input id="main-input" />
      </div>
      <div class="buttons">
        <button class="number number-1">1</button>
        <button class="number number-2">2</button>
        <button class="number number-3">3</button>
        <button class="number number-4">4</button>
        <button class="number number-5">5</button>
        <button class="number number-6">6</button>
        <button class="number number-7">7</button>
        <button class="number number-8">8</button>
        <button class="number number-9">9</button>
        <button class="number number-0">0</button>
        <button class="number enter">=</button>
      </div>
      <div class="operators">
        <button class="operator plus">+</button>
        <button class="operator minus">-</button>
        <button class="operator times">*</button>
        <button class="operator divide">/</button>
      </div>
      <div class="output"></div>
    </div>
    <script src="script.js"></script>
  </body>
</html>
result
console