Write a procedure
that prints a line (end line included) with the elements of S from the top to the bottom, separated by spaces.
Also, write a procedure
that prints a line (end line included) with the elements of S from the bottom to the top, separated by spaces.
The only containers that you can use here are stacks of integer numbers.
If you use recursivity in this exercise, you will probably exhaust the recursion stack.
The parameters are passed by reference. This avoids copying the stacks during the call, but implies that any changes that you make will modify the original stacks. Take this fact into account when you use these procedures to solve other exercices.
Observation You only need to submit the required procedures; your main program will be ignored.