I am working on Mendelson's Introduction to topology. This question arose after completing question $8$ from the exercise on page $87.$
A subset $A$ of a topological space $(X,\mathfrak{I})$ is said to be dense in $X$ if $\overline{A}=X.$ Prove that if for each non-empty open set $O$ we have $A\cap O \neq \emptyset,$ then $A$ is dense in $X.$
I proved the contrapositive:
Suppose $A$ is not dense in $X,$ that is, $\overline{A}\neq X=\overline{A}\cup \operatorname{Int}(C(A)).$ Then $\operatorname{Int}(C(A))\neq\ \emptyset.$ Thus $\ \exists\ $ a non-empty open set $O:=\operatorname{Int}(C(A))$ such that $A\cap O = \emptyset.$
I am wondering if there is also a direct proof.