How to calculate the surface area of a cube in C#

1 Answer

0 votes
using System;

class Program
{
    static void Main() {
        float  a = 8;
     
        float cube_surface_area = 6 * (a * a);  
     
        Console.Write("Cube Surface Area = " + cube_surface_area);  
    }
}



 
 
 
/*
run:
 
Cube Surface Area = 384
 
*/

 



answered Jul 21, 2021 by avibootz

Related questions

1 answer 135 views
1 answer 168 views
1 answer 173 views
1 answer 162 views
1 answer 157 views
1 answer 138 views
1 answer 202 views
...