This problem is from my final exam:
Let $C(X)_\Bbb R$ denote the set of all $\Bbb R$-valued continuous functions on $X$.
Let $X$ and $Y$ be compact topological spaces. Show that for any $\epsilon>0$ and and any $f\in C(X\times Y)_\Bbb R$ there exists $g_1,\dots,g_n\in C(X)_\Bbb R$ and $h_1,\dots,h_n\in C(Y)_\Bbb R$ (for some $n\in\Bbb N$) such that $$ \left|f(x,y)-\sum_{k=1}^ng_k(x)h_k(y)\right|<\epsilon\text{ for all }(x, y)\in X\times Y\text{.} $$
Multiple weaker versions have been asked on this site, but seems like they cannot be generalized trivially to this one. This assumes $X$ and $Y$ are Hausdorff. This assumes $X$ and $Y$ are metrizable. This doesn't but its accepted answer does. This is even weaker, assuming $X=Y=[0,1]$.
It still looks like an application of Stone-Weierstrass theorem. The problem is $\sum gh$ does not necessarily seperate points of $X\times Y$. For example, when $X$ and $Y$ are finite sets equipped with trivial topology, the only continuous functions are constant functions.