There is a second form of the if statement that could also make the code shorter, it is generally covered in the later part of any C programming course
tN = (tN > 9)? tN - 9 : tN;
This single statement is equivalent to the function above.
A second example of repeating code is the division to reduce each digit in the credit card number to a single number, this could also be put into a loop. The divisor could be reduced in each iteration of the loop if the algorithm sticks with using numbers.