Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.
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;
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.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.
You're trying to visit a URL that doesn't currently exist on the web. Most likely, a member posted a link a long time ago to a web page that has since been removed. It's also possible that there was a typo when posting the URL. We redirect you to this notice instead of stripping out the link to preserve the integrity of the post.