SET SERVEROUTPUT ON
DECLARE
FUNCTION getArea(v_radious NUMBER) RETURN NUMBER IS
l_pi NUMBER := 3.14;
BEGIN
RETURN (l_pi *(v_radious ** 2));
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(6));
DBMS_OUTPUT.PUT_LINE('Area of Rectangle is '|| getArea(6,4));
END;
FUNCTION getArea(v_radious NUMBER) RETURN NUMBER IS
l_pi NUMBER := 3.14;
BEGIN
RETURN (l_pi *(v_radious ** 2));
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(6));
DBMS_OUTPUT.PUT_LINE('Area of Rectangle is '|| getArea(6,4));
END;
No comments:
Post a Comment