Question #60759

A cube has a volume of 27 cubic meters. If all sides of the cube are doubled in length, then develop a program to calculte the difference in the original and new volumes of the cube.
1

Expert's answer

2016-07-18T07:38:16-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Volume_of_the_cube
{
    class Program
    {
        static void Main(string[] args)
        {
            double volumeOriginal = 27;
            Console.WriteLine("The volume of the original cube: " + volumeOriginal);
            double originalFace = Math.Pow(volumeOriginal, 1.0 / 3.0);
            Console.WriteLine("The length of the faces of the original cube: " + originalFace);
            double volumeNewCube = Math.Pow(originalFace * 2, 3);
            Console.WriteLine("The volume of a cube with a doubling of the original length" + "\nof the face of the cube: " + volumeNewCube);
            Console.WriteLine("The difference between the volumes of cubes: " + Math.Abs(volumeOriginal - volumeNewCube));
            Console.ReadKey();
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS