dweight.c 503 B

1234567891011121314151617181920
  1. #include "stdlib.h"
  2. #include "stdio.h"
  3. int main(void)
  4. {
  5. float height, length, width, volume, weight;
  6. printf("Enter height of box: ");
  7. scanf("%f", &height);
  8. printf("Enter length of box: ");
  9. scanf("%f", &length);
  10. printf("Enter width of box: ");
  11. scanf("%f", &width);
  12. volume = height * length * width;
  13. weight = (volume + 165) / 166;
  14. printf("Dimensions: %fx%fx%f\n", length, width, height);
  15. printf("Volume: %f\n", volume);
  16. printf("Weight: %f\n", weight);
  17. }