1
0
mirror of https://github.com/balkian/my_calculator_2.git synced 2024-12-21 12:38:13 +00:00

sin(x) button

This commit is contained in:
J. Fernando Sánchez 2019-01-29 10:51:04 +01:00
parent 053a915794
commit 4cb37aeefb

View File

@ -17,6 +17,10 @@ function fourth() {
var num = document.getElementById("n1");
num.value = Math.pow(num.value, 4);
}
function sin() {
var num = document.getElementById("n1");
num.value = Math.sin(num.value);
}
</script>
</head>
<body>
@ -27,5 +31,6 @@ Number:
<button onclick="square()"> x^2 </button>
<button onclick="inverse()"> 1/x </button>
<button onclick="fourth()"> x^4 </button>
<button onclick="sin()"> sin(x) </button>
</body>
</html>