Please help me with the task: Paint the Dominator. want to know the logic behind this code got your hint and based on that solved the program but still want to know why we took 2 times 317 317

Hello, I’m working on this task:

The biggest machine known to us is a huge cube, measuring 317 meters in each direction, and it is called “Dominator.” To stop Dominator, we plan to paint it with a machine-destroying paint. Write a program that calculates how much paint we will need to totally paint all six sides of Dominator, if painting 1 square meter takes 20 grams of paint. You have studied geometry, haven’t you? Output the result using string interpolation in the format:

I need ** grams of paint.

Here is my code:


public static class PaintTheDominator
{
   public static void Main()
   {
       //to panit 6 sides how much paint needed, for one side 20gm
       // cube is having 6 sides, measuring 317 m in each direction ==dominator
       //We want to paint each side, calculate how much paint need to paint all sides if 1m2 = 20gm

       int dominator = 317;
       int sqrm = 20;
       // int abc = dominator * sqrm;
       // int convertaqm = abc*10000;
       // int Cal = convertaqm * 20;

       int Cal = 317 * 317* 6 * 20;
       Console.WriteLine($"I need {Cal} grams of paint.");


   }
}

Can anyone please help me to solve it?