| 3 | */ |
| 4 | import java.util.Scanner; |
| 5 | public class IncomeTax_Calculate{ |
| 6 | public static void main(String[] args) { |
| 7 | |
| 8 | Scanner sc=new Scanner(System.in); |
| 9 | System.out.println("Enter your income in lakhs par annum: "); |
| 10 | float tax=0; |
| 11 | float income=sc.nextFloat(); |
| 12 | if (income<=2.5) { |
| 13 | tax = tax + 0; |
| 14 | } |
| 15 | else if (income>5f && income<=10.0f) { |
| 16 | tax=tax+0.05f*(5.0f-2.5f); |
| 17 | tax=tax+0.2f*(income-5f); |
| 18 | }else if (income>10.0f) { |
| 19 | tax=tax+0.05f*(5.0f-2.5f); |
| 20 | tax=tax+0.2f*(10.0f-5f); |
| 21 | tax=tax+0.3f*(income-10.0f); |
| 22 | } |
| 23 | System.out.println("The total tax paid by the employee is : "+tax); |
| 24 | } |
| 25 | } |
nothing calls this directly
no outgoing calls
no test coverage detected