#include // Steve Dannelly // Program to print an integer vertically /*****************************************/ class IntegerStack { public: IntegerStack(); int IsEmpty(); int IsFull(); void Push (int value); int Pop(); private: int top; int items[100]; }; /*****************************************/ // I deleted the code for the class's functions /*****************************************/ int main() { IntegerStack mystack; // the stack int number; // user input // get a number cout << "Enter an integer : "; cin >> number; // put the digits of the number on the stack while (number > 0) { if (!mystack.IsFull()) { mystack.Push(number % 10); number = number / 10; } else cout << "Stack Overflow!!!\n"; } // print the contents of the stack cout << "That number printed vertically is\n"; while (!mystack.IsEmpty()) cout << mystack.Pop() << endl; cout << endl << endl; }