#include <iostream>
using namespace std;

int main() {
    int size;
    int *ptr;
    cout<<"enter no. of values:"<<endl;
    cin>>size;
    
    ptr=new int(size);
    cout<<"enter values to be stored:"<<endl;
    for(int i=0;i<size;i++){
        cin>>ptr[i];
    }
    cout<<"values in the array"<<endl;
    for(int i=0;i<size;i++){
        cout<<ptr[i]<<" ";
    }
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: