Hi,

Use "SET SERVEROUTPUT ON " to set the output ON. By default the value is OFF - disabled. Set this ON and you can see the output displayed.
This is a function. So its better if you catch the returning value into some variable and display the returned value. Execute the function in following way from your SQL.

DECLARE
V_ANNSAL EMP.SAL%TYPE ;
BEGIN
V_ANNSAL := annual_comp2(999, 999) ;
DBMS_OUTPUT.PUT_LINE('Returned Value Is : '|| v_annsal) ;
END ;
/

Hope this helps.

Regards,

Pinakin.