ie. Pn is the partition of R into half open intervals of length 1/n with left end points k/n, where k varies over the integers. Fix n, and for each integer k such that the intersection of [k/n, (k+1)/n) and A is non empty, choose an element that interesection; and let An be the set of all such elements chosen. Clearly, An is countable. Then let B be the union of all An's over all positive integers n.
Then B is countable subset of A which is dense in A; and since A is closed, the closure of B is A. QED.
Comments
For a positive integer n, let
Pn ={ [k/n, (k+1)/n) | integer k},
ie. Pn is the partition of R into half open intervals of length 1/n with left end points k/n, where k varies over the integers. Fix n, and for each integer k such that the intersection of [k/n, (k+1)/n) and A is non empty, choose an element that interesection; and let An be the set of all such elements chosen. Clearly, An is countable. Then let B be the union of all An's over all positive integers n.
Then B is countable subset of A which is dense in A; and since A is closed, the closure of B is A. QED.