}( )main
؛int *p
؛int k=0
؛int s=0
؛k= f(&p)
for(int i=0; i<k ; i++)
؛s+=p[i]
؛cout<<s
{؛delete [ ]p
}int f (int ** g)
؛int n
؛cin>>n
؛g = new int [ n ] *
for ( int i=0; i<n; i++)
؛cin>>( *g)[ i]
{؛return n
قبل از for آخر new int [n]= *g هست