something went wrong with my code can you please check it
VON NEUMAN LOVES BINARY Doubt
Hello @Ajitverma1503,
There are two mistakes in your code.
Letβs understand them with the help of an example:
2
111
101
Expected Output:
7
5
What would be the value of dec once converting 111 to 7? Check.
What should be the value of dec before the start of second binary number 101? Think.
What would be the value of b once converting 111 to 7? Check.
What should be the value of b before the start of second binary number 101? Think.
Hope, this would help.
Give a like, if you are satisfied.
1 Like