Add them to a sum using a loop, then divide by 30. That's generally how one would find the average of a list of numbers:
double sum = 0;
for ( int i = 0; i < 30; i++ )
sum += a[i];
cout<<"Average: "<< sum / 30 <<'\n';
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004