  Let $n>2$ be a positive integer. In this paper, we obtain the general
solution of the following functional equation n \sum_{1 \le i<j \le n}
Q(x_i-x_j)=\sum_{i=1}^{n}Q(\sum_{j =1}^n x_j -n x_i) which is derived from the
centroid of the $n$ distinct vectors $x_1, ..., x_n$ in an inner product space.
Furthermore, we prove that a mapping $f$ between quasi-Banach modules over a
$C^*$-algebra satisfying approximately the equation can be approximated by a
quadratic mapping $Q$ satisfying exactly the equation such that $|f(x)-Q(x)|$
is bounded.
