Answer to Question #240083 in HTML/JavaScript Web Application for jane

Question #240083

A sphere is a perfectly round geometrical object that is three dimensional, with every point on its surface equidistant from its center. Many commonly-used objects such as balls or globes are spheres. If you want to calculate the volume of a sphere, you just have to find its radius and plug it into a simple formula, V = ⁴⁄₃πr³.Write a JavaScript script that will calculate the volume of a sphere, the volume should be fixed to 4 Decimal places.


1
Expert's answer
2021-09-22T03:48:05-0400
let radius = prompt("Enter radius");
let volume = (4/3)* Math.PI * Math.pow(radius, 3);


console.log('Volume of Sphere: '+volume.toFixed(4));

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS