How to calculate the volume of a cone in TypeScript

1 Answer

0 votes
const radius = 9;  
const height = 21;
const pi = 3.14159265359;  
        
const cone_volume = pi * (radius * radius) * (height / 3);
  
console.log("Cone volume = " + cone_volume);  
     
 
   
     
     
/*
run:
     
"Cone volume = 1781.28303458553" 
     
*/

 



answered Jul 22, 2022 by avibootz

Related questions

1 answer 136 views
1 answer 128 views
1 answer 132 views
1 answer 336 views
1 answer 215 views
1 answer 317 views
1 answer 151 views
151 views asked Jul 14, 2021 by avibootz
...