Building a space with given homology groups

Let $m \in \mathbb{N}$. Can we have a CW complex $X$ of dimension at most $n+1$ such that $\tilde{H_i}(X)$ is $\mathbb{Z}/m\mathbb{Z}$ for $i =n$ and zero otherwise?

-
Yes. Hint: You know how to do this for $\mathbb{Z}$, now try to topologically realize the exact sequence $\mathbb{Z} \rightarrow \mathbb{Z} \rightarrow \mathbb{Z}/m$ using a cofiber sequence. – Dylan Wilson Dec 12 '12 at 20:45
I know the answer for $m = 1$. What is the meaning of cofiber sequence? – topology Dec 12 '12 at 21:02
You don't need to know what a cofiber sequence is to answer your question. The idea is to take a sphere of dimension $n$ and attach a single $n+1$-cell. You need to know that homotopy-classes of maps $S^n \to S^n$ are in bijective correspondence with the integers (called degree) and using the degree $m$ map gives you what you want. – Ryan Budney Dec 12 '12 at 21:14
OK I understood now. I have to attach $D^{n+1}$ to $S^n$ via a degree $m$ map. So the resulting space will consist of one zero cell, one $n$ cell and one $n+1$ cell. Then I have to compute cellular homology – topology Dec 12 '12 at 22:00

The $i$-th homology of a cell complex is defined to be $\mathrm{ker}\partial_{i} / \mathrm{im}\partial_{i+1}$ where $\partial_{i+1}$ is the boundary map from the $i+1$-th chain group to the $i$-th chain group. Geometrically, this map is the attaching map that identifies the boundary of the $i+1$ cells with points on the $i$-cells.
For example you could identify the boundary of a $2$-cell (a disk) with points on a $1$-cell (a line segment). In practice you construct a cell complex inductively so you will have already identified the end bits of the line segment with some $0$-cells (points). Assume the zero skeleton is just one point and you attach one line segment. Then we have $S^1$ and identify the boundary of $D^2$ with it. This attaching map is a map $f: S^1 \to S^1$.
You can do this in many ways, the most obvious is the identity map. This map has degree one. The resulting space is a disk and the (reduced) homology groups of this disk are $0$ everywhere except in $i=2$ where you get $\mathbb Z$. If you take $f: S^1 \to S^1$ to be the map $t \mapsto 2t$ you wrap the boundary around twice and what you get it the real projective plane which has the homology you want in $i=2$ (check it).
Now generalise to $S^n \to S^n$.