#include <iostream>
using namespace std;
int main()
{
int x;
cout << " enter the size of the array ";
cin >> x;
int numbers[x];
for (int i = 0; i < x; i++)
{
cout << "enter array value : ";
cin >> numbers[i];
}
return 0;
}
this code is not run in visual studio 2019 but run in codeBlocks. just i need to take x from user.