Trouble understanding how $\int_c^d f \leq 0$ implies $f \leq 0$. We are asked to suppose that we have a function $f:[a,b] \rightarrow \Bbb R$ which is continuous and has the property that
$$\int_{c}^{d} f \leq 0 \quad \text{ whenever } a \leq c < d \leq b.$$
We want to prove that $f(x) \leq 0$ for all $x \in [a,b]$. 
I'm having trouble understanding how this would be true. Isn't it concievable that I could have a function which has some area under the $x$-axis as well as over it in the region from $c$ to $d$, such that the integral is either negative or $0$? Then this would imply that the function takes on negative values and positive values in the interval from $c$ to $d$.
Thanks for any help, I think maybe the problem might be worded subtley but it's driving me crazy.

For $\forall x\in(a,b)$, there is $\varepsilon >0$ such that $(x-\varepsilon,x+\varepsilon)\subset(a,b)$. Thus by the Mean Value Theorem for Integrals, we have
$$ \int_{x-\varepsilon}^{x+\varepsilon}f(x)dx=2\varepsilon f(\xi)\le0$$
for some $\xi\in(x-\varepsilon,x+\varepsilon)$. Thus $f(\xi)\le 0$. Letting $\varepsilon\to0$ gives
$$f(x)\le 0$$
for $x\in(a,b)$. Since $f(x)$ is continuous in $[a,b]$, we have conclude
$$f(x)\le 0, x\in[a,b]. $$
