How to calculate the average of x numbers?
Instead of giving an answer, I will try to paraphrase the steps, I hope this will help you solve your homework.


Identify the problem: What is the input? What is the output?
Comprehend the problem: Can you write a formula for the problem, that relates input to the output? What is the formula for the average of x numbers?
Identify different alternatives to solve the problem: How can you implement that formula? As a closed-form function? With an iterator? Solving recursively?
Selecting the best alternative to solve the problem and why: Which one did you select in step 3, and why?
Construct a list of instructions that allows to solve the problem: Write the pseudo-code about how you can actually implement the solution you selected on step 3.
Evaluate the solution: Is it working? How well is it working? Are there any conditions that it is not working? What are they? How long does it take to produce an answer? 


I hope that you are actually stuck and these explanations can guide you. Else I will regret my decision to help someone that actually looks for a ready-to-jump-on solution for his homework.