Help me with writing a program that calculates the average value of the elements of a 1-
dimensional array of size N.
shhhhhh14 0 Newbie Poster
Recommended Answers
Jump to PostAverage:
total = 0; for (i = 0 i < N; i++) { total += array[i]; i++) } avg = total/N;
You get to figure out the coding errors... :-)
All 2 Replies
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.