SET SERVEROUTPUT ON
DECLARE
FUNCTION getArea(v_radious NUMBER, v_precision NUMBER) RETURN NUMBER IS
l_pi NUMBER := 3.14;
BEGIN
RETURN TRUNC((l_pi *(v_radious ** 2)),v_precision);
END;
FUNCTION getArea(v_length NUMBER ,v_width NUMBER) RETURN NUMBER IS
BEGIN
RETURN(v_length * v_width);
END;
BEGIN
DBMS_OUTPUT.PUT_LINE('Area of Circle is '||
FUNCTION getArea(v_radious NUMBER, v_precision NUMBER) RETURN NUMBER IS
l_pi NUMBER := 3.14;
BEGIN
RETURN TRUNC((l_pi *(v_radious ** 2)),v_precision);
END;
FUNCTION getArea(v_length NUMBER ,v_width NUMBER) RETURN NUMBER IS
BEGIN
RETURN(v_length * v_width);
END;
BEGIN
DBMS_OUTPUT.PUT_LINE('Area of Circle is '||
getArea(v_radious =>6.4, v_precision => 2));
DBMS_OUTPUT.PUT_LINE('Area of Rectangle is '||
DBMS_OUTPUT.PUT_LINE('Area of Rectangle is '||
getArea(v_length => 6,v_width => 4));
END;
END;
No comments:
Post a Comment