Recursion-keypad codes

what is wrong in this code


i have modifiy it
you are printing rr but updating ctr

in function you are returning ctr in recursive case but function may terminate from base case;