A positive integer is divisible by $3$ iff 3 divides the sum of its digits I am having trouble proving the two following questions: 


*

*If $p|N$, $q|N$ and gcd(p,q)=1, then prove that $pq|N$

*If $x$ is non zero positive integer number, then prove that $3|x$ if and only if 3 divides the sum of all digits of $x$.
For both questions I tried to use theorems of discrete mathematics, but I could not find the way to solve them.

For (2), this is “casting out nines”, which used to be taught, and ought still to be taught, in elementary-school mathematics. It’s a matter of congruence modulo $9$, since $10\equiv1\pmod9$, we also have $10^n\equiv1\pmod9$, so that a number whose decimal representation is $d_md_{m-1}\cdots d_2d_1d_0$ is congruent to 
$d_m+d_{m-1}+\cdots+d_2+d_1+d_0$ modulo $9$ (the $d$’s are the decimal digits). The result follows.
