I had written this in texniccenter, and when I did ctrl+F7 it gave me error as "undefined control sequence". I don't understand what I am doing wrong. Is there something wrong in my code? I also downloaded the package "bbm" and added it in the beginning but nothing is working. Can someone help me? Hope this is not too silly for this forum.
\documentclass{article}
\usepackage{amsmath}
\usepackage{bbm}
\begin{document}
\section{Problems}
\label{sec:Problems}
\begin{flushleft}
This approach helps a lot since equality cases can be easily obtained.
The left side's >equality case is $r = 1$.
The right side's equality case occur when $y = rx$ passes
through the interior of exactly $n$ squares.
Such cases occur when $r$ is either an
integer, reciprocal of an integer, $r \geq n$ or $0 < r \leq 1/n$.
$\blacksquare$
\end{flushleft}
2.Determine all functions $f : \mathbb{R} \to \mathbb{R}$ such that
\[f(xy+f(x))=f(x)f(y)+x , \ \ \ \forall x,y \in \mathbb{R}.\]
\end{document}
This is what I wrote down. My alignment is pretty ugly here, and I apologise for that, but ugliness is better than incorrect code. Also, this is my first time using an editor. Usually I write on \LaTeX\ enabled platforms, such as math SE, MO etc. Also the part from "This approach..." is the ending of another problem, I omitted everything but kept this part so it might be clear about the errors. Also, I want to give a black square when the solution ends, I tried to give it, and that also gives "Undefined control sequence:. Please help me, thanks a lot.

\documentclass{...}and ending with\end{document}. – Sean Allred Sep 28 '14 at 13:42\mathbbis defined inamsfontspackage – David Carlisle Sep 28 '14 at 13:43\usepackage{amsfonts}or\usepackage{amssymb}? – Torbjørn T. Sep 28 '14 at 14:00\usepackage{amsmath}and\usepackage{bbm}only. See the edit there. :) – shadow10 Sep 28 '14 at 14:12{}button (which indents by 4 spaces) – David Carlisle Sep 28 '14 at 14:34