Question: help with the code

Write a procedure using the variable args that will take an unspecified finite number of numbers, delete the smallest and the largest, and return the average of the rest as a floating point number. If there are fewer than 3 arguments have an error message say: "There are not enough arguments. There should be at least three." 

You should have no input parameters in the definition of the procedure. You may write it directly or you may use the Maple command sort as a part of your program. Do ?sort to see how sort works. Test your procedure with each of the following argument sequences:  

   50,40,40, 40, 40, 10

   1,2

   seq(100 - i, i = 1..100)

   seq(modp(n,111), n=1..1000).

Please Wait...