Getting a head start on my classes' textbook
connador
0 Likes0 Commentsc_cpp#include <stdio.h> #define INCHES_PER_POUND 166 int main(void){ int height, length, width, volume, weight; printf("Please enter the height of your box: "); scanf("%d", &height); printf("Please enter the length of your box: "); scanf("%d", &length); printf("Please enter the width of your box: "); scanf("%d", &width); volume = height * length * width; weight = (volume + INCHES_PER_POUND - 1) / INCHES_PER_POUND; printf("Dimensions: %dx%dx%d\n", height, length, width); printf("Volume (cubic inches): %d\n", volume); printf("Dimensional weight (pounds): %d\n", weight); return 0; }