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


def sum_squares(a)
   var sum = 0
   for i in a
      sum = sum + i**2
   end
   return sum
end
 
WriteLn(sum_squares([3,1,4,1,5,9]))
end