Write a program in Java to accept the annual income. Pass the annual income to a function void tax(int x) which displays the income tax as per the given tariff:
Annual Income Income Tax
Up to 2,50,000 No tax
2,50,001 to 5,00,000 10% of the income exceeding 2,50,000
5,00,001 to 10,00,000 30,000 + 20% of the amount exceeding 5,00,000
10,00,001 and above 50,000 + 30% of the amount exceeding 10,00,000.
Pls answer this question
Answers
Answered by
0
Answer:
console.log('annual income')
.
# done
Answered by
1
Answer:
For loop runs three times as follows
when i = 0, arr[0] = 0
when i = 1, arr[1] = 1
when i = 2, arr[2] = 2
So
res = arr[0] + arr[2] = 0+2 = 2
so the output,
2
Similar questions