+ 4
If you have a factorial function, factorial(int), and a Stack - original_stack : Stack stack(original_stack) for(int i=0;i<stack.size;i++) { cout<<factorial(stack.top())<<endl; stack.pop(); } If this didn't work for you, you need to post your stack class as well...
25th Nov 2017, 4:38 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar