C Program Moving Average