+ 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...