Incorrect output

here is the link to my code, can someone please help me correct this.
if the input is 123, it is taking it as 12, for 12 it is taking as 1 and so on

Hey @prerna_gupta31
1 -> abc , 2 -> def , 3 -> ghi , 4 -> jkl , 5 -> mno , 6 -> pqrs , 7 -> tuv , 8 -> wx , 9 -> yz
This is what you have to implement acc to ques

Thanks… That got solved, but I am not able to print the correct count of these numbers… ca you please help here is the updated code https://ide.codingblocks.com/s/338221

Mantain a global variable and whenever u are printing ,then increment it and finally print in main

Why iu are wrong say we have 12
Now l=2
2^2=4 but
for 1 we have 3 choices and for 2 we have 3 choices soo 3*3=9 should be ans