i from 0 to num (inclusive).i, calculate the reverse of i.
reverse_i to 0.i is greater than 0:
reverse_i by 10 and add the last digit of i to reverse_i.i by 10 to remove the last digit.i and reverse_i equals num.
true.false.