- #include <iostream>
- using namespace std;
- void create(int *, int);
- int main()
- { int *a = NULL, len;
- cin>>len;
- create(a,len);
- for( int i = 0; i<len; i++ )
- cout << a[i] << " ";
- cout << endl;
- delete []a;
- a = NULL;
- }
- void create(int *ap, int n)
- { ap=new int[n];
- for(int i=0; i<n; i++) ap[i]=i;
- }