MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / main

Function main

Hackerrank_problems/Boxes_Through_a_Tunnel/Solution.c:38–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38int 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}

Callers

nothing calls this directly

Calls 2

is_lower_than_max_heightFunction · 0.85
get_volumeFunction · 0.85

Tested by

no test coverage detected