#include int calcVolume(int w, int l, int h); int calcSurfaceArea(int w, int l, int h); int calcSumOfEdges(int w, int l, int h); /* * This program defines a rectangular prism with a fixed width, * length, and height, and prints out the prism's volume, surface * area, and the sum of its edges. */ int main(int argc, char *argv[]) { // define dimensions int width = 20; int length = 30; int height = 10; printf("Our rectangle has width %d, length %d, and height %d\n", width, length, height); int volume = calcVolume(width, length, height); int surfaceArea = calcSurfaceArea(width, length, height); int sumOfEdges = calcSumOfEdges(width, length, height); printf("Volume: %d\n", volume); printf("Surface Area: %d\n", surfaceArea); printf("Sum of the Edges: %d\n", sumOfEdges); } /* Returns the volume of a rectangular prism with width w, * length l, and height h */ int calcVolume(int w, int l, int h) { return w * l * h; } /* Returns the surface area of a rectangular prism with * width w, length l, and height h */ int calcSurfaceArea(int w, int l, int h) { int surface1 = w * l; int surface2 = w * h; int surface3 = l * h; int sum = surface1 + surface2 + surface3; return 2 * sum; } /* Returns the sum of the edges of a rectangular * prism with width w, length l, and height h */ int calcSumOfEdges(int w, int l, int h) { int sum = w + l + h; return 4 * sum; }