Write a PL / SQL Program Reverse Of a Number - Computer Programming

Latest

C C++ Java Python Perl Programs Examples with Output -useful for Schools & College Students

Friday, September 29, 2017

Write a PL / SQL Program Reverse Of a Number

Program to Reverse  a Number

PROGRAM:


Declare
num number:=&n;
rev number:=0;
Begin
while(num>0)
Loop
rev=rev*10+mod(num,10);
num=num/10;
End loop;
Dbms_Output.Put_Line("Reverse of number is '|| rev);
End;


OUTPUT:
677
The Reverse is 776

No comments:

Post a Comment