What is your definition of dense? Is it that for each ball in the reals, it contains a point of S?

If so then suppose that S is dense. Let , then for each open set around x, it contains an element of S. Hence . As x was arbitrary, we have that .

Similarly the other way round.