Forgive me if this isn't the most elegant solution or if there are any syntax errors--I whipped this out as I should have been leaving for work.
Hope this helps.
code:<HR>Code:int array2pos = 0; array2[array2pos] = 0.0;<P>for ( int cnt = 0; cnt < 8760; cnt++ ) { if ( 0 == ( cnt % 24 ) && 0 != cnt ) { array2[array2pos] /= 24.0; array2pos++; array2[array2pos] = 0.0; } array2[array2pos] += array1[cnt]; } <P>array2[array2pos] /= 24.0;
Hope this helps.