Figured it out.

Re: c++ CLASS help 80 80
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;
Re: c++ CLASS help 80 80

I figured it out. Thanks.

Re: c++ CLASS help 80 80

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.