Table of contents Home page
Execute this code
var d = prompt("Enter the value of an angle in degrees.") if (d != null && !isNaN(d)) { alert("The cosine of an angle of " + d + "° is " + Math.cos(d * Math.PI / 180) + ".") }