Pop Then Peek
easyQuestion 503A stack<int> named s already holds 1, 2, 3 (3 is on top). Remove the top element with pop(), then print the new top element and the number of elements left, each on its own line.
Print exactly what is shown in Expected Output.
Expected output
Top: 2 Size: 2
= newline. The output ends with a newline, so print one after the last line.
Hints3 available
Sign in to use hintsTopics
STL ContainersStacks
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.