Here you will get pl/sql program for palindrome number.
A number is called palindrome number if its reverse is equal to itself. For example 12321 is palindrome while 123 is not palindrome.
Pl/SQL Program for Palindrome Number
declare n number; m number; i number; rev number:=0; r number; begin n:=12321; m:=n; while n>0 loop r:=mod(n,10); rev:=(rev*10)+r; n:=trunc(n/10); end loop; if m=rev then dbms_output.put_line('number is palindrome'); else dbms_output.put_line('number is not palindrome'); end if; end; /
Output
number is palindrome
Comment below if you have any queries regarding above palindrome program in pl sql.
The post Pl/SQL Program for Palindrome Number appeared first on The Crazy Programmer.
from The Crazy Programmer http://www.thecrazyprogrammer.com/2017/08/plsql-program-palindrome-number.html
Comments
Post a Comment