Advertisement
-Annie-

ConeVolumeAndArea

May 24th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function cone(r, h) {
  2.   let s = Math.sqrt(r * r + h * h);
  3.   let volume = Math.PI * r * r * h / 3;
  4.   console.log("volume = " + volume);
  5.   let area = Math.PI * r * (r + s);
  6.   console.log("area = " + area);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement