Why can’t pow() function be used to solve this as shown-
Binary to Decimal
hi @anikapassi17_6ce74879d4a8438b,
dont write int ans inside loop as it will make new variable just write ans
ans= ans+(p*currentdigit);// dont write int ans
understood, thanks a lot
1 Like
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.