I was wondering if there were a function to pass the # of arguments in a parameter to a value of a variable.

For instance, lets say I want a program that does averages, the main function collects the #'s, and then theres a getAvg function which does the math

Is there a way for one of the arguments in getAvg to be the # values being passed to it?