C Programming Code Examples C > Mathematics Code Examples Program to Find the volume and surface area of cone Program to Find the volume and surface area of cone This C Program calculates the volume and surface area of cone. This program is used to find the the volume and surface area of cone. The formula used in this program are Surface_area = Pi * r * (r + sqrt(r2 + h2)), Volume = 1 / 3 * Pi * r2 * h where r is the radius and h is the height of the cone & Pi = 22/7. #include <stdio.h> #include <math.h> int main() { float radius, height; float surface_area, volume; printf("Enter value of radius and height of a cone :\n "); scanf("%f%f", &radius, &height); surface_area = (22 / 7) * radius * (radius + sqrt(radius * radius + height * height)); volume = (1.0/3) * (22 / 7) * radius * radius * height; printf("Surface area of cone is: %.3f", surface_area); printf("\n Volume of cone is : %.3f", volume); return 0; }