C++ launchpad(count digit)

code-https://ide.codingblocks.com/s/59281
if i put a {} bracket after if it don’t show output e.g if if(r==k){ c++; n=n/10 }-why it not working please explain without braces it show correct output

if you put {} brackets then complete code is inside if and will only be executed when if condition is true.

ok thanks ,but i where to put digit constrait

ok thanks ,but i where to put digit constrait code-https://ide.codingblocks.com/s/59281

Mention the question link so i can understand the question

ques-https://online.codingblocks.com/player/5459/content/4789?s=1435

Can not open this link , please mention problem name or screenshot of question.