1#include <iostream>
2
3int main()
4{
5 //Create a user input size
6 int size;
7 std::cout << "Enter Size Of Array : ";
8 std::cin >> size;
9
10 //Create the array with the size the user input
11 int *myArray = new int[size];
12
13 //Populate the array with whatever you like..
14 for(int i = 0; i < size; ++i)
15 {
16 myArray[i] = rand() % 10;
17 }
18
19 //Display whats in the array...
20 for(int i = 0; i < size; ++i)
21 {
22 std::cout << "Item In Element " << i << " of the array = : " << myArray[i] << std::endl;
23 }
24
25 //Delete the array
26 delete[] myArray;
27
28 return 0;
29}