You'll read from input, then allocate an array of exactly elements. This teaches the new operator for dynamic allocation and the importance of memory cleanup with delete.
Static arrays require sizes known at compile time. Dynamic arrays live on the heap and can have any size. You request memory with new and return it with delete. Forgetting delete causes memory leaks; using memory after delete causes crashes.
This problem demonstrates allocating, using, and freeing a dynamic array. The bracket in delete[] is required for arrays to free all elements.