Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cone(radius, height) {
- let formulaVol = ((((1 / 3) * Math.PI) * (Math.pow(radius, 2))) * height).toFixed(4);
- let formulaArea = (Math.PI * radius * (radius + Math.sqrt(Math.pow(radius, 2) + Math.pow(height, 2)))).toFixed(4);
- console.log(`volume = ${Number(formulaVol)}`);
- console.log(`area = ${Number(formulaArea)}`);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement