-- This PL SQL program finds the area of a circle, whose radius is given as input.
declare
a number(10,2);
pi constant number(10,2):=3.14;
r number(10);
begin
r:=&r;
a:=pi*r*r; -- calculating the area of circle
dbms_output.put_line('area='||a);
end;
Output
No comments:
Post a Comment