I don't know now, or I forgot the rules, about proving continuity. Just by reasoning/analyzing, I believe f is continuous at x = 5.
When x is not an integer, f(x) tends to be 5 coming from the left or coming from the right. At x=5, the second piece of the f is a hole because x=5 is not in the domain of that piece, for 5 is an integer.
But the first piece takes over. The hole at x=5 is filled up by the f(x) = x of the first piece. Hence x=5 is true for the piecewise f function.