L7Sqr was answering your question about how to store a number in a variable, which is really the first step that you need to know for the operations that you're trying to do here.
Personally, I'd use a quick and dirty temporary file for something like this, but you could also easily put your command line arguments into an array, and do a bubble sort, like in the example here: http://tldp.org/LDP/abs/html/arrays.html
One of the simplest ways to do this, however, would be to write your command line integer parameters to a temporary file and then 'sort' the file and use 'head' and 'tail' to get the lowest and highest values.
Then to sum it all up, you could loop through the file, adding each number as you go, or use 'awk' to do it in a single line.
I hope this helps. Is this for homework? It sounds like you might want to go through the bash scripting guide to get more familiar with some of the basic operations.