The question is from "Measure theory and probability theory (pag. 51)" by Krishna and Soumendra that lacks of a demonstration.
Let $(\Omega, \mathcal{F}, \mu)$ be a measure space and $f:\Omega \rightarrow [0, \infty]$ a non-negative measurable function. Suppose $\{\delta_n\}$ to be a sequence of positive real numbers and $\{N_n\}$ a non-decreasing sequence of integers such that $\delta_n \rightarrow 0$, $N_n \rightarrow \infty$ and $\delta_n N_n \rightarrow \infty$ (for example $\delta_n=2^{-n}$ and $N_n=n2^n$).
Define
\begin{gather*} f_n(\omega)=\left\{ \begin{array}{ll} j\delta_n \ \ \text{if} \ \ j\delta_n \le f(\omega) <(j+1)\delta_n \ \ j=0,\dots,N_n-1 \\ \delta_nN_n \ \ \text{if} \ \ f(\omega) \ge \delta_nN_n \end{array} \right. \end{gather*}
I need to prove that $\{f_n\}$ converges to $f$ pointwise and that each $f_n$ is measurable.