The Code is working fine when I enter the number 123 and the output of function #1 is 1101111 and the reversal is 11111011 So this is the binary number and the answer is correct
But when the number entered is 36 the output of function 1 is 001001
The main problem arises hereβ¦The function #2 should revert 001001 and it takes 1001 and reverts it to 1001 but the expected output is 100100
Whenever the input from the user is being even the diamond is getting distorted.
The task is to Enhance the code to force the user to enter only an odd number as input.