Boy... let's get started shall we:
#1:
Code:
int main ()
{
int N, average, max, neg_avg, pos_max;
cout<<"Enter the value of N: ";
cin>>N;
average= nRandomNumbers(neg_avg);
max= nRandomNumbers(pos_max);
You are trying to pass in an uninitialized value into the function. The function takes this unknown value and tries to do stuff with it. It could be a negative value, it could be a billion, it could be 42... you have no idea. I'm thinking you wanted to pass in N here and not the two variables you are currently using.
#2
Code:
for (i=0; i<N; i++)
randm= (-250)+ rand()%451;
First off, your code there will generate numbers between +200 and -250 not the +250 and -250 that you said you wanted. Secondly, you haven't called srand anywhere in your code although that could be intentional for the purpose of testing your results. Thirdly, all you are doing is calling the function N times (remember from point#1 above that you are simply passing in an unknown/uninitialized value here) and throwing away all the numbers generated except for the last one which will be saved into the variable randm.
#3
Code:
int neg_sum=0;
...
for (i=0; i<N; i++)
{
neg_sum++;
}
All this will do is set neg_sum to N (if N is positive) otherwise neg_sum will stay 0.
#4.
Code:
int nRandomNumbers(int N)
{
...
if (randm<0)
{
avg_neg= neg_sum/N;
return avg_neg;
}
...
}
That bit of code contains the only return statement in that function (at least the version you've posted). This should not compile without warnings/errors because if randm happens to be greater than or equal to 0 then there is no return statement executed.
Also, remember that neg_sum is always going to be either 0 or N so the return value is always going to be 0 or 1 (provided randm is negative).
If your purpose is to generate N random numbers and find the max/average of those N values then you'll need to move the code that tracks that information into the loop that is generating the random values. You aren't able to currently access anything outside that random number generating loop but the very last value so any attempt to figure out a greatest or average value is already lost at that point.
[edit]Spent to much time forming my post, tabstop beat me :P[/edit]