HTML JavaScript Volume of a Right Circular Cylinder Wri

( HTML / JavaScript - Volume of a Right - Circular Cylinder )

Write the code of an HTML file that uses JavaScript to find the volume of a given right circular cylinder whose base circumference C is known and the height is known.

(5) mCHTML JavaScript Volume of a Right Circular Cylinder Write the code of an HTML file that uses JavaScript to find the volume of a given right circular cylinder whose base circumference G is known and the height is known

Solution

<!DOCTYPE html>
<html>
<body>
<h1>Calculating Volume of Right Circular Cylinder</h1>
Circumference: <input type=\"text\" id=\"circum\" value=\" \">
Height: <input type=\"text\" id=\"height\" value=\" \">

<p>Click the button to calculate volume of right circular cylinder.</p>
<button onclick=\"volume()\">Volume</button><br/><br/>
Volume: <input type=\"text\" id=\"volume\" value=\"Volume\">

<script>
function volume() {
    var x = document.getElementById(\"circum\").value;
    var y = document.getElementById(\"height\").value;
    var z = (Number(x) * Number(y));
    document.getElementById(\"volume\").value = z;
}
</script>

</body>
</html>

( HTML / JavaScript - Volume of a Right - Circular Cylinder ) Write the code of an HTML file that uses JavaScript to find the volume of a given right circular c

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site