| 36 | } |
| 37 | |
| 38 | int main() |
| 39 | { |
| 40 | int n, i; |
| 41 | scanf("%d", &n);//user input |
| 42 | //malloc used to allocate memory |
| 43 | box *boxes = malloc(n * sizeof(box)); |
| 44 | //accept length, width and height of n boxes from user |
| 45 | for ( i = 0; i < n; i++) { |
| 46 | scanf("%d%d%d", &boxes[i].length, &boxes[i].width, &boxes[i].height); |
| 47 | } |
| 48 | /*for each box, if the height of the box is lower than max height, |
| 49 | print the volume of the box*/ |
| 50 | for ( i = 0; i < n; i++) { |
| 51 | if (is_lower_than_max_height(boxes[i])) { |
| 52 | printf("%d\n", get_volume(boxes[i])); |
| 53 | } |
| 54 | } |
| 55 | return 0; |
| 56 | } |
nothing calls this directly
no test coverage detected