How would you prove that if $x$ is an integer, then
$$x-\left\lfloor \frac{x}{2} \right\rfloor\; =\; \left\lfloor \frac{x+1}{2} \right\rfloor$$
I tried to start by saying that if $x$ is an even integer, then:
$$\left\lfloor \frac{x}{2} \right\rfloor = \frac{x}{2}.$$
However, I am stuck on showing that $$\left\lfloor \frac{x+1}{2} \right\rfloor$$ is also $\frac{x}{2}$. Intuitively It makes intuitive sense just by playing around with some sample numbers, but I don't know how to make it mathematically rigorous. Further, what do you do in the odd case? Is this even the right way to go about it?