Javatpoint Logo
Javatpoint Logo

Program to find the surface area of a cube

Explanation

In this program, we have a cube with equal length, width, and height. We need to find its Surface Area.

A cube is a three-dimensional geometrical figure/container having all its surfaces with equal sides (length, breadth, and height). We have six equal square(surfaces).

Surface Area of Cube = 6 (Surface area of one Square)

Total Surface Area Of Cube = 6( side × side )

Formula

Algorithm

  1. Define equal value for all sides of cube.
  2. Use these values in the given formula.
  3. Print the Surface Area of Cube.

Complexity

O(1)


Solution

Python

Output:

Surface Area of Cube is: 150

C

Output:

Surface Area of Cube is: 150.00000

JAVA

Output:

Surface Area of Cube is 150.0000

C#

Output:

Surface Area of Cube is:  150

PHP

Output:

Surface Area of cube is  = 150

Next Topic#





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA