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