Possible Duplicate:
Function with range equal to whole reals on every open setFunction with range equal to whole reals on every open set
I was told that it is possible to define a function $f:\mathbb R\to \mathbb R$ such that it takes every value on every interval. I have not been able to come up with such a function. Could someone show me one?