You are on page 1of 3

Output

Stack operations
1.Push
2.Pop
3.Display
4.Peek

Enter your choice:(1-2-3-4)1


Enter item:10
Stack operations
1.Push
2.Pop
3.Display
4.Peek
Enter your choice:(1-2-3-4)1
Enter item:20
Stack operations
1.Push
2.Pop
3.Display
4.Peek
Enter your choice:(1-2-3-4)3
20
10
Stack operations
1.Push
2.Pop
3.Display
4.Peek
Enter your choice:(1-2-3-4)4
top most item is: 20
Stack operations
1.Push
2.Pop
3.Display
4.Peek
Enter your choice:(1-2-3-4)2
popped item is: 20
Stack operations
1.Push
2.Pop
3.Display
4.Peek
Enter your choice:(1-2-3-4)5
invalid choice
Output

Stack operations
1.Push
2.Pop
3.Display
Enter choice:(1/2/3)1
Enter book name:Harry Potter
Stack operations
1.Push
2.Pop
3.Display
Enter choice:(1/2/3)1
Enter book name:Moral stories
Stack operations
1.Push
2.Pop
3.Display
Enter choice:(1/2/3)1
Enter book name:Alice in Wonderland
Stack operations
1.Push
2.Pop
3.Display
Enter choice:(1/2/3)3
Alice in Wonderland
Moral stories
Harry Potter
Stack operations
1.Push
2.Pop
3.Display
Enter choice:(1/2/3)2
deleted item is: Alice in Wonderland
Stack operations
1.Push
2.Pop
3.Display
Enter choice:(1/2/3)4
thank u
Output

Enter number of elements:5


Enter list of numbers:12
Enter list of numbers:10
Enter list of numbers:5
Enter list of numbers:19
Enter list of numbers:20
The number divisible by 5 is: [10, 5, 20]

You might also like