Task

Write a program to find the sum of squares of a numeric vector.

The program should work on a zero-length vector (with an answer of   0).



Related task

   Mean


Sum of squares.
 
First input is length of vector, then rest of input is vector.
 
Ingredients.
1 g eggs
0 g bacon
 
Method.
Put bacon into the 1st mixing bowl.
Take eggs from refrigerator.
Square the eggs.
Take bacon from refrigerator.
Put bacon into 2nd mixing bowl.
Combine bacon into 2nd mixing bowl.
Fold bacon into 2nd mixing bowl.
Add the bacon into the 1st mixing bowl.
Ask the eggs until squared.
Pour contents of the 1st mixing bowl into the 1st baking dish.
 
Serves 1.
 
 