Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get averages on an array

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi trying to figure out how to create a function that would find the average of a two dimensional array, and then pass I guess the (sum/count) to main().

Any help
 
well, the easiest thing to do is treat it as a 1 dimentional array but loop from
zero to (dimention1 - dimention2 -1)

Or you can do a for loop with 2 vars i and j and add it up that way.


Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top