Non venuman loves binary

why we are giving cout after the loop end why not inside it and if we give inside it what will be the error please explain me

Basically we are running while loop to convert the given binary to decimal. once we come out of while loop we have our binary number converted to decimal and we print it. if we print inside the while loop then at that point our number is still under processing and has not been completely converted to decimal number and hence we wont get the desired result.

Hope ur doubt is cleared now.

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.