Write a program that prompts the user to enter a positive integer and displays all its smallest factors in decreasing order. For example, if the integer is 120, the smallest factors are displayed as 5, 3, 2, 2, 2. Use the StackOflntegers class to store the factors (e.g., 2, 2, 2, 3, 5) and retrieve and display them in reverse order. Solution #include #include using namespace std; class StackOfIntegers { int s[100],top; public: StackOfIntegers() { top=-1; } void put(int n) { top++; s[top]=n; } int get() { if(top==-1) { return -1; } return s[top--]; } }stack; void primeFactors(int n) { while (n%2 == 0) { stack.put(2); n = n/2; } for (int i=3; i<=sqrt(n); i=i+2) { while (n%i==0) { stack.put(i); n = n/i; } } if (n > 2) stack.put(n); } int main() { int n; cout<<\"Enter a positive integer : \"; cin>>n; primeFactors(n); int f; f=stack.get(); while(f>0) { cout<.