#include<iostream>

#include<stack>
using namespace std;

void function(){
    for(int i = 0; i<5;i++){
        cout<<i<<"\n";
    }
        
}

int main(){
    stack<int>stack;
    stack.push(21);
    stack.push(22);
    stack.push(23);
    stack.push(24);

    
    cout<<stack.top()<<"";
    while(!stack.empty()){
        cout<<stack.top();
        stack.pop();
    }

    function();
    return 0;
    
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: