Chewbacca and Number

I dont understand what question want to say.what we have to do in the problem

Hello @ikshit9
What the questtion is asking is basically that what is the possible smallest number we can get by interchanging digits (changing t to 9-t) .
Now if we already have the smallest number that can be : we will change 0 digits
Otherwise we will change some digits to make it the smallest number

For ex : 4545 has two digits which when interchanged will give a smaller number ( 5 when interchanged will give 4 ) so all the 5 in the number arre changed and the output becomes 4444.

Hint : Change all the numbers with value >4 . But keep in mind that you cannot make the first number 0.

i made the program but why it isnot providing any output

@ikshit9 your logic is correct but you are not implementing it in the correct way:

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.

in line number 25 and 29 why we are adding zero to it please help

@ikshit9 we are doing this because initially the ch is in ascii value.
So.lets suppose if the digit is 1 then it’s ascii value is 49.and if we subtract 0 whose ascii value is 48 then the number will be 1.

And for the same reason when we are adding we are making it again resemble as character according to their ascii value.like if the digit is 1 then if we add 0 to it in ascii value I.e 48 then we will get number corresponding to that ascii value as a char.