3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by Fbody
0
int temp=0;
for (int i = 1; i < num_days; i++ )
    {
    temp=temperature[i]+temp; // assuming temperature array is int
    }
float ans=temp/num_days;
return ans;

Edited by Dani: Formatting fixed

0

I figured it out. Thanks.

Edited by s_r_k: n/a

0

I figured it out. Thanks.

Next time, just leave your original post as is so that someone else can benefit from it if it applies to their problem. By "deleting" your original post, you've made this thread completely worthless to future readers.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.