Question
Prove: $m \equiv p \pmod n$ if and only if $m\%n = p\%n$, where $a\%b$ is the remainder when $a$ is divided by $b$.
Normally I think it is just a definition, but now I meet a question to prove it, I find it hard to prove
if $m \equiv p \pmod n$ then $n\mid(m-p)$ (the question only give us $m \equiv p \pmod n$ if $n\mid(m-p)$)
in the first step, after getting this, I can substitute $m$ as $kn + r$ and $p$ as $k^\prime n + r^\prime$, so the statement can be proved, but how can I get $m \equiv p \pmod n$ then $n\mid(m-p)$?
I am not sure if my direction is not correct