• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
November 14, 2022 |490 Views
C++ Program to Find CSA & TSA of a Cube
  Share   Like
Description
Discussion

In this video, we will write a C program to find the CSA and TSA of a cube. 

The curved surface area of a cube is the sum of the areas of all its faces, except its top and lowermost faces. Hence, the curved surface area of the cube is the sum of the areas of all four side faces of a cube.

Example:

Input

Side of the cube = 3

Output

Curved Surface area = 36
Total Surface Area of Cube = 54


Dry run
=> Curved Surface area = 4 * 3 * 3 = 36
=> Total Surface Area of Cube = 6 * 3 * 3 = 54

Here we calculate the Curved Surface Area & TSA of a Cube using simple formulas.
=> Curved Surface Area of a cube = 4 * a * a
=> Total Surface Area of Cube = 6 * a * a
where a defines the side of the cube.

C++ program to find CSA & TSA of a cube
https://www.geeksforgeeks.org/cpp-program-to-find-curved-surface-area-of-a-cube/coding

Read More