... Check (X)

WHILE X 0

R=X MOD 10

Result=R2^pwr + Result

X=X\10 pwr=pwr + 1

WEND

Check Result END FUNCTION

O