First suppose that
\(f\) is continuous at
\(c\text{,}\) and let
\((x_n)\) be a sequence in
\(S\) such that
\(x_n \to c\text{.}\) Let
\(\varepsilon \gt 0\) be given. By continuity at
\(c\text{,}\) there exists
\(\delta \gt 0\) such that
\(|f(x)-f(c)|
\lt \varepsilon\) whenever
\(x \in S\) and
\(|x-c| \lt
\delta\text{.}\) Since
\(x_n \to c\text{,}\) \(|x_n-c| \lt \delta\) for all but finitely many
\(n\text{.}\) Hence
\(|f(x_n)-f(c)| \lt
\varepsilon\) for all but finitely many
\(n\text{,}\) so
\(f(x_n)
\to f(c)\text{.}\)
Conversely, assume \(f(x_n) \to f(c)\) for every sequence \((x_n)\) in \(S\) that converges to \(c\) but \(f\) is not continuous at \(c\text{.}\) Then there exists \(\varepsilon_0
\gt 0\) such that for every \(n \in \N\) there exists \(x_n \in S\) with \(|x_n-c| \lt 1/n\) and
\begin{equation*}
|f(x_n)-f(c)| \ge \varepsilon_0.
\end{equation*}
Clearly, \(x_n \to c\text{,}\) but \(f(x_n)\) does not converge to \(f(c)\text{,}\) contradicting the hypothesis. Therefore \(f\) must be continuous at \(c\text{.}\)