set serveroutput on
DECLARE
name varchar2(10);
basic_salary number(10);
hra_salary number(10);
da_salary number(10);
gross_salary number(10);
BEGIN
name:=&name;
basic_salary:=&basic_salary;
If basic_salary<=100 and basic_salary>=100 than
hra_salary:= basic_salary*5/100;
da_salary:= basic_salary*10/100;
gross_salary := basic_salary+ hra_salary+ da_salary;
RDBMS_OUTPUT.PUT_LINE(gross_salary);
elseIf basic_salary<=1001 and basic_salary>=5000 than
hra_salary:= basic_salary*10/100;
da_salary:= basic_salary*15/100;
gross_salary := basic_salary+ hra_salary+ da_salary;
RDBMS_OUTPUT.PUT_LINE(gross_salary);
elseIf basic_salary<=5001 and basic_salary>=10000 than
hra_salary:= basic_salary*15/100;
da_salary:= basic_salary*20/100;
gross_salary := basic_salary+ hra_salary+ da_salary;
RDBMS_OUTPUT.PUT_LINE(gross_salary);
elseIf basic_salary>1000 than
hra_salary:= basic_salary*20/100;
da_salary:= basic_salary*25/100;
gross_salary := basic_salary+ hra_salary+ da_salary;
RDBMS_OUTPUT.PUT_LINE(gross_salary);
else
RDBMS_OUTPUT.PUT_LINE('director by:-www.sybca4.blogspot.in');
endif;
END;
/
created by g.p. vaghasiya
No comments:
Post a Comment