Im supposed to write code that will dynamically create an array of ints. The size of the array should be determined by the number the user enters. Therefore, you must prompt the user to enter a number. After you have created the array, write the code to populate the array with random numbers between 1 and 100. Finally, print out the contents of the array on a SINGLE line, separated by TABS
Here is what I have so far. What am I doing wrong?
1 2 3 4 5 6 7 8 9 10 11 12 13
int arraySize;
cout << "Enter the size of the array: ";
cin >> arraySize;
int *array = newint[arraySize];
for (int j = 0; j < arraySize; j++)
{
arraySize = rand() % 101;
cout << array[j];
}