Computer Science, asked by kamala13012006, 1 month ago

Write a PL/SQL function to calculate the income tax for the given employee: Conditions:                   If pay ( 2,50,000, no tax is charged.                   If pay is ( 2,50,001 and ( 5,00,000, 5% of pay is charged as tax.                   If pay is ( 5,00,001 and ( 10,00,000, 20% of pay is charged as tax.                   If pay is ( 10,00,001, 30% of pay is charged as tax. .​

Answers

Answered by xXInnocentHeartXx
14

Answer:

  • Combine harvesters are one of the most economically important labour-saving inventions, significantly reducing the fraction of the population engaged in agriculture.
Answered by aburaihana123
1

Tax amount is 50000

Explanation:

  • If pay ( 2,50,000, no tax is charged.                  
  • If pay is ( 2,50,001 and ( 5,00,000, 5% of pay is charged as tax.                   If pay is ( 5,00,001 and ( 10,00,000, 20% of pay is charged as tax.                   If pay is ( 10,00,001, 30% of pay is charged as tax.

create or replace procedure tax_cal(sal in number)

                 is

                 r number (12 ) : =0;

                 being

                 if sal <=250000 then

                 r:=0;

                 elseif sal<=500000 then

                 r:=0+(sal-250000)*5/100;

                 elseif sal<=1000000 then

                 r:=12500+(sal-500000)*20/100;

                 elseif sal<=1000000 then

                 r:=12500+500000+(sal-1000000)*30/100;

                 end if;

                 end;

                  /

                execute

                SQL>set serveroutput on;

                SQL>exec tax_cal(500000)

                            Total tax = 50000

#SPJ3

Similar questions