1  #include <iostream>
2
3  int main()
4  {
5      int *ptr = 0;
6      int size = 0;
7
8      cout << "How many numbers do you wish to enter: ";
9      cin >> size;
10
11     ptr = new int [size];
12
13     for (int i = 0; i < size; i++)
14     {
15         cout << "Enter a number: ";
16         cin >> ptr [i];
17     }
18
19     cout << "The numbers you entered were" << endl;
20
21     for (int i = 0; i < size; i++)
22     {
23         cout << ptr [i] << endl;
24     }
25
26     return 0;
27 }
28