How to calculate the volume of cylinder in TypeScript

1 Answer

0 votes
const height = 21;  
const radius = 9;  
const pi = 3.14159265359;  
       
const cylinder_volume = pi * (radius * radius) * height;  
      
console.log("Cylinder volume = " + cylinder_volume);  
 
  
 
 
  
/*
run:
   
"Cylinder volume = 5343.84910375659" 
  
*/
 

 



answered Jul 21, 2022 by avibootz

Related questions

1 answer 138 views
1 answer 111 views
1 answer 109 views
1 answer 117 views
1 answer 125 views
1 answer 141 views
1 answer 132 views
...