Is it true that $A_n$ contains all the elements of odd order?

An alternative proof uses the fact that $A_n$ is a normal subgroup of index $2$ in the symmetric group $S_n$. So the quotient $S_n/A_n$ is a cyclic group of order $2$. Now if $\sigma\in S_n$ has odd order $k$, and if I write $[\sigma]$ for the equivalence class of $\sigma$ in $S_n/A_n$, then $[\sigma]^k=[\sigma^k]=[e]$, but also, since both elements of $S_n/A_n$ satisfy $x^2=[e]$, and since $k$ is odd, we have $[\sigma]^k=[\sigma]$. So $[\sigma]=[e]$, which means that $\sigma\in A_n$.


That is exactly correct and I don't think there is a more clear answer.


Your proof is correct; another approach is as follows.

Restrict the sign homomorphism to the subgroup generated by given permutation $\sigma$. $$\phi:\langle\sigma\rangle\to\{\pm1\}$$ Order of codomain is $2$, order of domain is odd, and we know that order of image divides both of them. Therefore, $\phi$ is trivial homomorphism and hence $sgn(\sigma)=1$.