Printing pattern

how to print the second part of no in reverse order:
here is my code: