citeste n
aux ← n
oglindit ← 0
cat timp aux ≠ 0 executa
oglindit ← oglindit * 10 + (aux % 10)
aux ← aux / 10
daca oglindit = n atunci
scrie 'Palindrom'
altfel
scrie 'Nu este Palindrom'
citeste n
aux ← n
ciframax ← 0
cat timp aux ≠ 0 executa
daca (aux % 10) > ciframax atunci
ciframax ← aux % 10
aux ← aux / 10
scrie ciframax