----- Original Message ----- 
From: "Christopher Coale" <[email protected]>
To: <[email protected]>
Sent: Monday, July 20, 2009 7:55 PM
Subject: Re: [c-prog] moving average problem

> I'm confused as to what the problem is.
>
> double Sma(double *ds, int size)
> {
>    double res = 0;
>    for (int i = 0; i < size; i++)
>       res += ds[i];
>
>    return ds / (double)size;
> }

    I think you answered my question :). I wanted to know how to use for or 
while in this case. It looks like for would be the way to go. Thanks.

Bill

Reply via email to