I have absolutely no idea what is going wrong in this
Playing with bits
Hello @Aug19LPPP0135,
Can you please share your code with me?
Steps:
- Open online Coding Blocks IDE: https://ide.codingblocks.com/
- Paste your code there.
- Save it there.
- Share the URL generated.
Hope, this would help.
Give a like, if you are satisfied.
Hello @Aug19LPPP0135,
Solution:
- Create a temporary variable (say temp) inside the outer while function.
- Assign it the value a.
- Pass it to the inner while function instead of passing a.
Reason:
After each iteration of outer while loop, the value of a becomes 1 as the inner while loop modifies its value.
Modification:
I have modified your code:
Hope, this would help.
Give a like, if you are satisfied.
1 Like