n = io.read("*n")
print(n)
dig1 = (n/1000)-((n%1000)/1000)
x = n%1000
dig4 = n%10
y = (x/10)-((x%10)/10)
dig2 = (y/10) - ((y%10)/10)
dig3 = y%10
n2 = ((dig4*1000) + (dig3*100) + (dig2*10) + dig1)
print(n2)
if(n == n2)
then
    print("Equal")
else
    print("Not Equal")
end

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: