-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
37 lines (36 loc) · 1.69 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
<!DOCTYPE html>
<html>
<head>
<title>Calculadora con Bootstrap</title>
<!-- Agregar la referencia a Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
</head>
<body>
<div class="container mt-5">
<div class="row justify-content-center">
<div class="col-6">
<div class="card">
<div class="card-header text-center">
Calculadora
</div>
<div class="card-body">
<div class="form-group">
<input type="number" class="form-control" id="operand1" placeholder="Operando 1">
</div>
<div class="form-group mt-3">
<input type="number" class="form-control" id="operand2" placeholder="Operando 2">
</div>
<div class="text-center mb-3 mt-3">
<button class="btn btn-primary mr-2 mt-3" onclick="calcular('+')">Suma (+)</button>
<button class="btn btn-primary mr-2 mt-3" onclick="calcular('-')">Resta (-)</button>
<button class="btn btn-primary mr-2 mt-3" onclick="calcular('*')">Multiplicación (*)</button>
<button class="btn btn-primary mt-3" onclick="calcular('/')">División (/)</button>
</div>
<p class="text-center">Resultado: <span id="result"></span></p>
</div>
</div>
</div>
</div>
</div>
<script src="script.js"></script>
</html>