If you don't know the fundamental theorem of finitely generated abelian groups (which seems like it might be the case given that you don't know what an "elementary divisor" is, unless this is simply a problem of language which is certanly possible), here is another approach.
Suppose $X$ is such a group. Consider the collection of all elements of order $p$ in $X$; it is not empty, since $p$ divides the order of $X$, so by Cauchy's Theorem there is such an element. If there exists $x\in X$ of order $p$ such that $\langle x\rangle \cap A = \{0\}$, then let $B=\langle x\rangle$. Then $A\cap B=\{0\}$, and $|A+B| = |X|$, hence $A+B=X$, and therefore $X=A\oplus B$, proving that $X\cong A \times C_p$, as desired (I use $C_n$ for the cyclic group of order $n$).
The only other possibility is that every element of order $p$ in $X$ is contained in $A$. Let $x\in X$ be an element of order a power of $p$ that maps to a generator of $X/A$ (it exists, because if you pick any preimage of one generator, and ther order is not a $p$-power, you can pick an adequate multiple to get another element that maps to perhaps a different generator and is a prime power. Note also that $x\notin A$ and $px\in A$. So now we are working inside the $p$-parts of $X$ and $A$, and so we may assume that $X$ and $A$ are both abelian $p$-groups. So $A=C_{p^{a_1}}\oplus\cdots\oplus C_{p^{a_k}}$ with $a_1\leq\cdots\leq a_k$. Write $px$ as an element of $A$; by adding suitable elements of $A$ to $x$ you can ensure that any component of $px$ that is a multiple of $p$ is actually equal to $0$: for example, if the $i$th component is $p^{\ell}ky_i$, where $y_i$ is the generator, $\ell\gt 0$ and $\gcd(k,p)=1$, then adding $-p^{\ell-1}ky_i$ to $x$ still keeps it an element that maps to a generator of $X/A$, but now the $i$th component of $px$ is $0$. Then replacing any generators by suitable powers, you may assume that the "vector" that describes $px$ has all components equal to either $0$ or $1$. Doing an easy change of basis for $A$ gives you the description of $X$ that you want in this situation.