Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C help

Name: Anonymous 2013-03-16 21:08

How would I calculate an average recursively in C? Let's say I have an array with 8 numbers. I will calculate the average of the first two, then third and fourth, ... Then I will do it again with the 4 numbers I have and repeat until I only have 2 numbers where I just add them and divide by two. But how do I implement this?

posted this on /g/, thought i'd also try the /g/ textboard as well. Please help!

Name: Anonymous 2013-03-16 21:30

erm... sounds like you know what to do, just not how.. Practice!
(hint: use two loops, and nest one in the other..)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List