Construct a function which is continuous in $[1,5]$ but not differentiable at $2, 3, 4$
$$\ \ \ \ \mathsf{W}\ \ \ \ $$
$|x|$ is continuous, and differentiable everywhere except at 0. Can you see why?
From this we can build up the functions you need: $|x-2| + |x-3| + |x-4|$ is continuous (why?) and differentiable everywhere except at 2, 3, and 4.
How about $f(x) = \max(\sin(n\pi x),0)$ or perhaps $g(x) = |\sin(n\pi x)|$?