7 of 7 deleted 9 characters in body

C (gcc), 131, 116, 90, 89, 87 bytes


Try it online!

Update: Fixed a bug in the original. Fused in the helper function, reducing an additional 15 bytes.

Update 2: -25 bytes thanks to ErikF.

Update 3: -1 byte thanks to ceilingcat.


        printf("%d\n"+!a*2, // No clue how this works anymore, but it'll advance the pointer 
                            // to the string constant when a number shouldn't be printed.
        a=l>59|A<3&l>44?rand()%-~v // Random integer to print in [0, v]
        :!A*v); // If bottom layer, return remaining volume