Java Help

Status
You're currently viewing only 0's posts. Click here to go back to viewing the entire thread.
Not open for further replies.

0

Ars Scholae Palatinae
609
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.

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.
 
Status
You're currently viewing only 0's posts. Click here to go back to viewing the entire thread.
Not open for further replies.