How to compute Ext in this case. Let $A= \mathbb{Z}/(pq)$ where $p$ and $q$ are primes, if $M=A/(p)$, $N=A/(q)$ be two $A$-modules. How can I compute $\text{Ext}_{A}^n(M,N)$ in the cases $p=q$ and $p \not= q$.

There is the usual surjection $A\to A/p$, and the kernel of this is the ideal $(p)$, that can be covered by multiplication by $p$ to get the beginning of a resolution of $A/p$
$$A\stackrel{p}\to A$$
The kernel of multiplication by $p$ in $A$ is the ideal $(q)$, and this can be covered by multiplication by $q$, to get
$$A\stackrel{q}\to A\stackrel{p}\to A$$
Since the kernel of multiplication by $q$ is $(p)$, you obtain an infinite free periodic resolution 
$$\cdots A\stackrel{q}\to A\stackrel{p}\to A\stackrel{q}\to A\stackrel{p}\to A$$
If you apply $\hom_A(?,A/q)$ to this we obtain a cochain complex using the natural isomorphism $\hom_A(A,-)\simeq -$,
$$A/q \stackrel{p}\to A/q\stackrel{q}\to A/q\stackrel{p}\to\cdots.$$
Multiplication by $q$ is manifestly $0$ on $A/q$, but there are two cases to consider if $p=q$ or not.
