0

Why does reverse not work for inputs 101, 101?

Please explain, I give up on trying to resolve this problem. I actually do not see a single reason why it malfunctions with this two specific inputs. https://code.sololearn.com/cmUn2731TQJE/?ref=app

17th May 2019, 3:57 PM
Jakub Patrik
3 odpowiedzi
+ 2
Hello Jakub Patrik , First, can you explain to me what your program was supposed to do? I fail to understand what it was for. Also give an example for input, and the desired output. I won't promise you nothing, but maybe I can try, or suggest something.
17th May 2019, 5:11 PM
Ipang
+ 1
Well, you input two binary numbers and the program creates so called reverse sum. This sum has to be reversed again in order to display an actual sum. F.e. : 1 +1=10; 10+11=101,but 101+101=1000 (should be 1010) as I recall correctly. Thanks for the help.
17th May 2019, 5:13 PM
Jakub Patrik
+ 1
Yeah, just spotted it. Thanks you so much mate.
17th May 2019, 5:28 PM
Jakub Patrik