VOOZH about

URL: https://www.geeksforgeeks.org/dsa/calculate-volume-surface-area-cone/

⇱ Calculate volume and surface area of a cone - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Calculate volume and surface area of a cone

Last Updated : 29 Feb, 2024

Given slant height, height and radius of a cone, we have to calculate the volume and surface area of the cone.

  • Cone :
    Cone is a three dimensional geometric shape. It consists of a base having the shape of a circle and a curved side (the lateral surface) ending up in a tip called the apex or vertex. 

👁 Calculate volume of a cone


  • Volume of a cone :
    The volume of a cone is given by the formula - 
volume = 1/3(pi * r * r * h)

  • where r is the radius of the circular base, and h is the height (the perpendicular distance from the base to the vertex).


area = pi * r * s + pi * r^2 

  • Where r is the radius of the circular base, and s is the slant height of the cone.


Examples :

Input : 
radius = 5
slant_height = 13
height = 12
Output :
Volume Of Cone = 314.159
Surface Area Of Cone = 282.743

Input :
radius = 6
slant_height = 10
height = 8
Output :
Volume Of Cone = 301.593
Surface Area Of Cone = 301.593



Output :

Volume Of Cone : 314.159
Surface Area Of Cone : 282.743

Time complexity : O(1) 
Auxiliary Space : O(1) 

Comment