PL/SQL Program to Find Area and Perimeter of Rectangle

PL/SQL Program to Find Area and Perimeter of Rectangle :

declare 
length number; 
width number; 
area number; 
perimeter number; 
begin
length:=:length;
width:=:width; 
area:=length*width; 
perimeter:= 2*(length+width); 
dbms_output.put_line('AREA OF RECTANGLE IS:'||area); 
dbms_output.put_line(' '); 
dbms_output.put_line('PERIMETER OF RECTANGLE IS:'||perimeter); 
end;


OUTPUT:

AREA OF RECTANGLE IS:40
 
PERIMETER OF RECTANGLE IS:26

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.