How to prove what element in $\mathbb{Z}_n$ you get when the elements of $\mathbb{Z}_n$ are summed? Based on trial and error I found that when $n$ is odd, the sum of the elements of $\mathbb{Z}_n$ is zero in $\mathbb{Z}_n$. When $n$ is even, the sum of the elements of $\mathbb{Z}_n$ is $n/2$ in $\mathbb{Z}_n$. Here is what I have so far for a proof:
Let k be an integer. Then k in $\mathbb{Z}_n$=k-$nm$, where $m$ is an integer such that $nm\leq$k and for any integer $t\ne$m, $nt$>k or $nt<nm$. The sum of the elements of $\mathbb{Z}_n$=$\frac{n-1}{2}n$. So the sum of the elements of $\mathbb{Z}_n$ in $\mathbb{Z}_n$ is $\frac{n-1}{2}n$-$nm$ which can be simplified to $\frac{n-1-2m}{2}n$.
I am not sure how to relate that to zero or n/2.

Pair $x\in\mathbb{Z}_n$ with $n-x$. Their sum is clearly $n\equiv 0\mod{n}$. If $n$ is odd, each $x$ pairs with $n-x\ne x$, while if $n$ is even, $\frac{n}{2}$ pairs with itself. The result follows.
