here i am not able to understand the question can u explain it to me?
Chewbacca and number
the question is simply
wanting you to invert the digit if the number is greater than equal to 5
inverting means replacing present no by 9 - currentDigit
also there is a condition if the Most signifcant bit of the input no if 9
then dont invert it
u have to create the smallest no
eg:
1234
ans 1234
i/p
7821
o/p-> 2121
eg 9539
o/p-> 9431
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.