#include <iostream>
#include <new>
using namespace std;
int main ()
{
long int i,n,j;
int * p;
cout<<"Cuántos números (variable n) se asignará?: (n*1024*1024*1024)";
cin>>i;
i = (i*1024*1024*1024);
p = new(nothrow) int[i];
//p= new int[i];
if(p == nullptr)
cout<<"Error: no se pudo asignar la memoria";
else
{
cout<<p<<endl;
for(n=0; n<i; n++)
{
cout<<"Ingrese un numero positivo (o negativo para salir): ";
cin>>p[n];
if(p[n] < 0)
break;
}
cout<<"usted Ingresó: ";
for(j=0; j<n; j++)
cout<<p[j]<<", ";
delete[] p;
}
return 0;
}