Pages

Monday, 17 October 2016

Perimeter of Rectangle

   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

No comments:

Post a Comment