I cannot resist first telling you the easy method:
Let . Then the closure of A is equal to your set , whereas is closed. Clearly, is also bounded, which is why is compact.
Maybe you already thought of this.
The other (and in this case legal) way: Let be an open cover of . In particular, is contained in some , say .
An open subset of is a disjoint union of open intervals. In particular, the point 0 is contained in an open interval inside of . Suppose this open interval has as its right end point. Then all points of with are also contained in this interval, i.e. all such points are contained in . But all but finitely many points of satisfy , and so all but finitely many points of are contained in .
Since we have a cover of the set , the point is contained in some set , for each . But then the cover
is a finite subcover of .