Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

Program to find the surface area of cuboid

Program to find the surface area of cuboid on fibonacci, factorial, prime, armstrong, swap, reverse, search, sort, stack, queue, array, linkedlist, tree, graph etc.

<< Back to PROGRAM

Program to find the surface area of cuboid


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

A cuboid is a three-dimensional geometrical figure/container having six rectangular surfaces with the different sum of dimensions (length, width, and height) where every two opposite faces are of equal length width and height.


Surface Area Of  Cuboid = 2lw + 2lh + 2hw = 2( lw + lh + hw ).
l is length, w is width and h is height.


  1. Define values for all dimensions.
  2. Use these values in the given formula.
  3. Print the Surface Area of Cuboid.





l = 2
w = 3
h = 5
surfacearea =2*( l *w  + w* h + h*l)
print("Surface Area of Cuboid is : ");
print (surfacearea);


Surface Area of Cuboid is:  62


                   int main() 
                       float   l , w, h, surfacearea;
                       l= 2; 
                       w = 3;
                       h = 5;
                       surfacearea =2*( l *w  + w* h + h*l);
                       printf("\n\n Surface Area of Cuboid is : %f", surfacearea);
                       return (0);


Surface Area of Cuboid is:  62.00000


public class test1 
public static void main (String args[]) 
 {   float  l, w, h,surfacearea;     
     l = 2;
     w =3;
     h = 5 ;
    surfacearea  = 2*( l *w  + w* h + h*l);
     System.out.println ("Surface Area of Cuboid is:  ");


Surface Area of Cuboid is:  62.0


using System;
class Program
{   static void Main() 
    {   float  l,  w, h, surfacearea;
       l  = 2;
      w = 3; 
       h =5; 
       surfacearea = 2*( l *w  + w* h + h*l);
        Console.WriteLine("Surface Area of Cuboid  is:"+surfacearea);


Surface Area of Cuboid is:  62


$l = 2;
$w = 3;
$h =  5;
$surfacearea = 2*( $l  * $w  + $w *$h + $h * $l);
echo("Surface Area of Cuboid is  = ");


Surface Area of cuboid is  = 62

Next Topic#

Related Links:

Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf