Here is an example of how you can do this. Notice the changes on the while loop, the array, calculating the average and other self-explainatory changes.

CODE
#include <iostream>
// We use this to determine the amount of elements in our array.
#define MAX_NUMBERS 1024
using namespace std;
int main()
{
// Our array of numbers.
int num[MAX_NUMBERS];
// The amount of numbers counted.
int num_count = 0;
// It was annoying me, so I made it display once. :P
cout << " Enter numbers " << endl;
// Loop until the user enters a negative number.
while (true)
{
if(!(num[num_count - 1] < 0))
cin >> num[num_count];
else break;
num_count++;
}
// Use a double instead of a float due to it's limitations.
double avrg = 0.0;
// Add all the numbers together.
for(int i = 0; i < num_count - 1; i++)
avrg += num[i];
// Divide all the added numbers by the amount of numbers we have used.
avrg /= num_count - 1;
cout << avrg << endl;
return 0;
}
Hope that helps.

EDIT: Removed
system("PAUSE"); as I know Amadeus would kill me for it.
This post has been edited by RodgerB: 13 Jan, 2008 - 02:40 AM