Before writing the program of calculating the surface area of cone in different programming languages, firstly we have to know about what is cone and what is the formula to find surface area of it?
What is Cone?
A cone is a half-part of the sphere.
Surface Area of Cone is the total number of square units which exactly cover the cone surface.
Surface Area of Cone = pi * r * s + pi * r * r
Where, r is the radius of cone
Program of calculating the surface area of a cone in different Programming languages
Program 1: Write a Program in C language:
Output of Above C program:
Program 2: Write a Program in Java language:
Output of Above Java program:
Program 3: Write a Program in PHP programming language.
Output of Above PHP program:
Program 4: Write a Program in Python programming language.
Output of Above Python program: