Write a piece of code that declares a stack of integers and uses a loop to fill

Question:

Write a piece of code that declares a stack of integers and uses a loop to fill it with the multiples of 2 from 0 through 100 inclusive, such that 0 is at the top of the stack and 100 is at the bottom: [100, 98, 96, ..., 4, 2, 0]. You can print the stack to verify its state.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: