Solution 1:

As any automorphism of $C_n$ is of the form $g \mapsto g^k$ for some $k$, such that $GCD(n, k) = 1$, we have any semidirect product $C_n \rtimes C_m$ being of the form $\langle a, b|a^n = e, b^m = e, b^{-1}ab = a^k\rangle$. From that presentation we get, that $a = b^{-m}ab^{m} = a^{k^m}$. Thus, $ord(a) = n$ iff $n|k^m - 1$.

So any such semidirect product is defined by presentation $\langle a, b|a^n = e, b^m = e, b^{-1}ab = a^k\rangle$, where $n|k^m - 1$