mirror of
https://github.com/balkian/my_calculator_2.git
synced 2024-12-22 04:58:12 +00:00
sin(x) button
This commit is contained in:
parent
053a915794
commit
4cb37aeefb
@ -17,6 +17,10 @@ function fourth() {
|
|||||||
var num = document.getElementById("n1");
|
var num = document.getElementById("n1");
|
||||||
num.value = Math.pow(num.value, 4);
|
num.value = Math.pow(num.value, 4);
|
||||||
}
|
}
|
||||||
|
function sin() {
|
||||||
|
var num = document.getElementById("n1");
|
||||||
|
num.value = Math.sin(num.value);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -27,5 +31,6 @@ Number:
|
|||||||
<button onclick="square()"> x^2 </button>
|
<button onclick="square()"> x^2 </button>
|
||||||
<button onclick="inverse()"> 1/x </button>
|
<button onclick="inverse()"> 1/x </button>
|
||||||
<button onclick="fourth()"> x^4 </button>
|
<button onclick="fourth()"> x^4 </button>
|
||||||
|
<button onclick="sin()"> sin(x) </button>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user