Perimeter of Rectangle

00:32 0 Comments A+ a-

   Write a PLSQL block to calculate area and Perimeter of Rectangle.


Program:



     declare
     l int:=2;
     w int:=4;
     res int;
     peri int;
     begin
    res:=l+w;
    peri:=2*res;
    dbms_output.put_line('perimeter of rectangle'||peri);
    end;
   /


Output:


perimeter of square 12