Table of contents Home page
Execute this code
var d = prompt("Enter the value of a cosine.") if (d != null && !isNaN(d)) { if (d >= -1 && d <= 1) { alert("The arc cosine of " + d + " is " + Math.acos(d) + ".") } else { alert("A cosine cannot have the value " + d + ".") } }