diff --git a/Stack Using Array.cpp b/Stack Using Array.cpp index 4095c5aed..944258ed4 100644 --- a/Stack Using Array.cpp +++ b/Stack Using Array.cpp @@ -36,6 +36,10 @@ void show() } } +void topmost() +{ + cout << "\nTopmost element: "<>ch; if (ch==1) { @@ -60,6 +65,10 @@ int main() { show(); } + else if(ch==4) + { + topmost(); + } } while(ch!=0);