My code not displaying any sort of output Please help....Its urgent

this is the link of the code .
The code is not displaying output…
https://ide.geeksforgeeks.org/TRqR18nS66

The string your code generating is abababa and for which ans =false and rr=0 and you have not considered this condition while outputting .
One more thing try to use" else if " condition in one line as writing “else” in one line and “if” in another may lead to nested else if which become hard to handle .

Thanks a lot brother