Skip to content

Commit 8f9178b

Browse files
committed
x^4 button
1 parent e929e01 commit 8f9178b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

calculator.html

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
var num = document.getElementById("n1");
66
num.value = Math.pow(num.value, 3);
77
}
8+
function cuarta() {
9+
var num = document.getElementById("n1");
10+
num.value = Math.pow(num.value, 4);
11+
}
812
</script>
913
</head>
1014
<body>
@@ -13,6 +17,7 @@ <h1>Calculadora de Ignacio Sánchez-Moliní López</h1>
1317
<input type="text" id=“n1">
1418
<p>
1519
<button onclick="cube()"> x^3 </button>
20+
<button onclick="cuarta()"> x^4 </button>
1621
</p>
1722
</body>
1823
</html>

0 commit comments

Comments
 (0)