Javascript Mathematical Functions


<html><head></head><body> <script>
document.write("Math.sqrt(81): ",Math.sqrt(81),"<br>");
document.write("Math.abs(-43): ",Math.abs(-43),"<br>");
document.write("Math.ceil(3.654): ",Math.ceil(3.654),"<br>");
document.write("Math.cos(0.5*Math.PI): ",Math.cos(0.5*Math.PI),"<br>");
document.write("Math.sin(0.5*Math.PI): ",Math.sin(0.5*Math.PI),"<br>");
document.write("Math.max(2,34,45,6,7): ",Math.max(2,34,45,6,7),"<br>");
document.write("Math.min(2,34,45,6,7): ",Math.min(2,34,45,6,7),"<br>");
document.write("Math.pow(2,3): ",Math.pow(2,3),"<br>");
document.write("Math.floor(2.38): ",Math.floor(2.38),"<br>");
</script></body></html>



Δεν υπάρχουν σχόλια:

Δημοσίευση σχολίου