create or replace procedure palind(ran in out integer,res in out integer) Is num1 integer:=0; i integer; su integer:=ran; begin while (ran>0) loop i:=mod(ran,10); num1:=num1*10+i; ran:=trunc(ran/10); end loop; if (su=num1) then res:=1; else res:=0; end if; end; / declare a integer:=&a; b integer:=0; begin palind(a,b); if (b=1) then dbms_output.put_line(' Palindrome'); else dbms_output.put_line('Not Palindrome'); end if; end; /
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter