Program to Check the Number Palindrome or Not

PROGRAM TO CHECK WHETHER THE GIVEN NUMBER IS PALINDROME OR NOT


SQL> Ed palin.SQL

Declare

N number :=&n;

I = number;

S number;

R number: =0;

K number: =n.

   Begin

While [n>0]

For i in I ….n

Loop

R;=Mod(n,10);

S:=(s*10)+r;

N: =(n-r)/10;

End loop

If (s=k) THEN

Dbms-output.Put_line(‘given no is palindrome’ );

End;


Output

A=121

Given number is palindrome.

Related

Oracle 3574333632767743211

Post a Comment

emo-but-icon

item