A basic integration. $$
  \int_{-\pi/2}^{\pi/2} [\tan x] \,\text{d}x
$$
where $[\quad]$ represents the floor function.
A graphical approach will help here.
My observation is that all the areas on the positive and negative cancel out leaving a portion of area on the negative $x$-axis.
Post edit:
I add one more sub part.What happens when it is "least integer greater than" that means ceiling function.
 A: Here's a nice little graphical solution, (which I believe is what your observation was): notice that the graph of $f(x)=\lfloor{\tan(x)} \rfloor$ has a sort of symmetry such that (for non-integers), we have $f(x)+f(-x)=-1$. Thus we can write the integral as $$\int_{-\pi/2}^{\pi/2} f(x)\ dx=\int_0^{\pi/2} f(x)+f(-x) \ dx = \int_0^{\pi/2} -1  \ dx = \color{red}{-\pi/2}$$
I'll add a picture here to show the observation that is guiding my equivalence of integrals. Also note that the last integral could really just the formula for an area of a rectangle, so I would definitely call this a geometric approach.

On a cooler note, you can actually do this with any odd function (as long as the function doesn't take on the integers in any sizeable domain) as in general for $y$ is not an integer, we have
$$\lfloor y \rfloor + \lfloor -y \rfloor= -1$$
Edit: To answer your question about the ceiling function, try to do the same type of thing based on the observation that the following holds when $y$ is not an integer
$$\lceil y \rceil + \lceil -y \rceil = 1$$
A: The improper integral as given is of the form $\infty-\infty$, hence does not exist. But there is the "principal value“
$$\lim_{\theta\to\pi/2}\int_{-\theta}^\theta\lfloor\tan x\rfloor\>dx=-{\pi\over2}\ .\tag{1}$$
Proof. Put
$$\alpha_k:=\arctan k\quad(k\geq0)\ .$$
Then $\lim_{n\to\infty}\alpha_n={\pi\over2}$. Looking at the figure we obtain
$$\eqalign{\int_{-\alpha_n}^{\alpha_n}\lfloor\tan x\rfloor\>dx&=\sum_{k=1}^n\int_{-\alpha_k}^{-\alpha_{k-1}}\lfloor\tan x\rfloor\>dx+\sum_{k=1}^n\int_{\alpha_{k-1}}^{\alpha_k}\lfloor\tan x\rfloor\>dx\cr  &=\sum_{k=1}^n(\alpha_k-\alpha_{k-1})(-k)+\sum_{k=1}^n(\alpha_k-\alpha_{k-1})(k-1)\cr  &=-\sum_{k=1}^n(\alpha_k-\alpha_{k-1})\cr  &=-\alpha_n\to-{\pi\over2}\quad(n\to\infty)\ .\cr}$$
Since
$$\alpha_k-\alpha_{k-1}=\arctan k-\arctan(k-1)=\arctan{1\over 1+k(k-1)}\approx{1\over k^2}\qquad(k\gg1)$$
we see that the two  sums of type $\sum_{k=1}^\infty(\alpha_k-\alpha_{k-1})(k-1)$ diverge like the harmonic series. On the other hand their individual terms converge to $0$. It follows that we may take the continuous limit in $(1)$.
A: Consider the function $\{\tan x\}$ (where the braces denote the fractional part of the argument).
As the plot has a central symmetry (the grapher spends a hard time with it), the areas under the curves are complementary to each other and add up to half of the rectangle area, i.e. $\dfrac\pi2$.

Then the claim follows from $\lfloor x\rfloor=x-\{x\}$.
For the ceiling, just observe that $\lceil x\rceil=-\lfloor-x\rfloor$.
