-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathps4_q2.java
More file actions
41 lines (39 loc) · 1.32 KB
/
Copy pathps4_q2.java
File metadata and controls
41 lines (39 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.barneel;
import java.util.Scanner;
//Calculation of tax by employee as per standard govt tax slab.
/*
* Income Tax Slab Individuals Below The Age Of 60 Years – Income Tax Slabs
Up to Rs 2.5 lakh NIL
Rs. 2.5 lakh -Rs. 5 lakh 5%
Rs 5.00 lakh – Rs 10 lakh 20%
> Rs 10.00 lakh 30%
* */
public class ps4_q2
{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("enter your annual income:");
float income = sc.nextFloat();
float incomeTax = 0;
float taxableIncome = income - 250000;
if (income >= 1000000)
{
incomeTax = incomeTax + ((income - 1000000) * (30.0f / 100.0f)) +100000f+(0.05f*250000f);
System.out.println("the income tax is :"+incomeTax);
}
else if (income < 1000000 && income >= 500000)
{
incomeTax= ((income-500000f)*0.2f)+(0.05f*250000f);
System.out.println("the income tax is:"+incomeTax);
}
else if(income<=500000 && income>250000)
{
incomeTax=((income-250000f)*0.05f);
System.out.println("the income tax is :"+incomeTax);
}
else
{
System.out.println("no income tax for you.");
}
}
}