![]() |
A 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. We will be going to learn how can we calculate it by using JavaScript. Formula used:Curved Surface area of a Cone = πrl Examples: Input: radius = 0.8, slant height = 20 Approach
Example: Below is the function to find the Curved Surface Area of the Cone:
Output 50.26548245743669 Time complexity: O(1), as the execution time is constant and does not grow with the size of the input. Auxiliary Space complexity: O(1) as it uses a constant amount of memory regardless of the input size. |
Reffered: https://www.geeksforgeeks.org
JavaScript |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 16 |