I think i mentioned the wrong code i am not geeting output in continuous manner but i don't able to put the count (int) into the string please check this code

https://ide.codingblocks.com/s/423071

You are supposed to print local counts, you are doing that globally. See this https://ide.codingblocks.com/s/423491

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.