Let $f:[0,1]\rightarrow\mathbb{R}$ be continuous. Consider the partition $\big\{0,\frac1n,...,\frac{n-1}{n},1\big\}$ of $[0,1]$. Define $$f_n(t)=\left\{\begin{array}{ll}f\big(\frac{k}{n}\big), & t\in\big[\frac{k-1}{n},\frac{k}{n}\big] \, (k=1,...,n) \\ f\big(\frac1n\big), & t=0. \end{array}\right.$$ Then show that $(f_n)$ uniformly converges to $f$.
Now i have proved that when $t=1$ then $(f_n)$ converges to $f(1)$ and when $t\in[0,1)$ then $(f_n)$ converges to $f(0)$. But now I dont know what to do. How to show that this function is uniformly converges to $f$.
Since $f$ is uniformly continuous, for any $\epsilon > 0$ there exists $\delta > 0$ such that $|x-y| < \delta$ implies $|f(x) - f(y)| < \epsilon$. Take $N \in \mathbb{N}$ such that $1/N < \delta$.
If $n > N$, then given any $x \in (0,1]$ there exists $k$ such that $x \in ((k-1)/n,k/n]$. Hence, $$|f(x) - f_n(x)| = |f(x) - f(k/n)| < \epsilon,$$
since $|x- k/n| < 1/n < \delta$.
Also $|f(0) - f_n(0)| = |f(0)-f(1/n)| < \epsilon$ for all $n >N$ since $|1/n -0|< \delta$.