If you observe carefully. Value of N passed changes like
N --->N/10 --->N/102 ---> N/103 --- and so on.
you can build a recursive function
for the above function There is no meaning in deciding 0 < N < 10 as base condition because if N = 0 if condition fails T(N/10) = 0/10 = 0 which again calls T(N/10) = 0/10 = 0 and so on. Therefore we want to stop further execution once zero has occurred therefore we put zero in base condition.
Happy learning :)