Help me in solving this question

code link: https://ide.codingblocks.com/s/179339

@siddharth9k9
Hello siddharth,
what issue u are facing?

not able to print the possible strings

@siddharth9k9
In this question you need to print number of ways to form n digit number using two different digits a,b with constraint that no two b should be consecutive (they havent asked u to print all such strings).

if u want to print all such strings then write a recursive function func generate all possible strings and print only those strings where no two consecutive digit is b .

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.