Write a C++ program to create a dynamic array using new operator and take array elements from user. Retrieve all possible subarrays whose elements value sum up to 30. Also delete the array using delete operator code example
Example: c++ delete dynamically allocated array
int length = 69;
int * numbers = new int[length];
delete[] numbers;