If X takes only non-negative integer values then I figured out $$E[X]= (\sum_{n=0}^\infty P[X>n]$$
but I'm having hard time proving
$$ E[X]⩽ (\sum_{n=0}^\infty P[X>n] ⩽ E[X]+1$$ for any non-negative random variable X
I feel like this statement is contradicting the first part of the question. Can someone show me how?
Since the first part is for integer-valued variables, while in the second part $X$ is not integer valued, you should do some rounding. Up or down? The direction of inequality suggests rounding up. So, let $Y=\lceil X\rceil$. Clearly, $X\le Y\le X+1$. Also, $$E[Y]= \sum_{n=0}^\infty P[Y>n]$$ by the first part. It remains to observe that $Y>n$ if and only $X>n$.