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 122 views
1 answer 147 views
1 answer 160 views
1 answer 144 views
1 answer 142 views
1 answer 128 views
1 answer 192 views
...