```
num = int(input("正の整数を入力してください: "))

def reverse_number(num)：
    reverse = 0
    while num > 0：
        last_digit = num % 10
        reverse = (reverse * 10) + last_digit
        num = num // 10
     return reverse

print("The reverse number is:", reverse_number(num))
```
num = int(input("Ingrese un número entero positivo: "))

def reverse_number(num):
    reverse = 0
    while num > 0:
        last_digit = num % 10
        reverse = (reverse * 10) + last_digit
        num = num // 10
    return reverse

print("El número invertido es:", reverse_number(num))