-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIndex.html
34 lines (33 loc) · 1.34 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
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css2?family=Rubik+Dirt&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<h1 class="calculator-title">Calculadora</h1>
<div class="calculator">
<h2 class="calculator-instructions">Introduzca la cantidad y realice la operación</h2>
<input type="text" id="display" readonly>
<div class="calculator-buttons">
<button onclick="appendNumber(7)">7</button>
<button onclick="appendNumber(8)">8</button>
<button onclick="appendNumber(9)">9</button>
<button onclick="appendOperation('+')">+</button>
<button onclick="appendNumber(4)">4</button>
<button onclick="appendNumber(5)">5</button>
<button onclick="appendNumber(6)">6</button>
<button onclick="appendOperation('-')">-</button>
<button onclick="appendNumber(1)">1</button>
<button onclick="appendNumber(2)">2</button>
<button onclick="appendNumber(3)">3</button>
<button onclick="appendOperation('*')">*</button>
<button class="c"onclick="clearDisplay()">C</button>
<button onclick="appendNumber(0)">0</button>
<button onclick="calculateResult()">=</button>
<button onclick="appendOperation('/')">/</button>
</div>
</div>
<script src="script.js"></script>
</body>
</html>