package com.company; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int tax1 = 10; int tax2 = 20; int tax3 = 30; int tax4 = 40; int tax5 = 50; double income = 0; double tax = 0; System.out.println("Please enter your name: "); String name = input.next(); System.out.println("Please enter your income: "); income = input.nextInt(); double temp = income; if (income > 0) { temp = income / tax1; if (income > 23_000) { temp += (income - 23_000) / tax2; if (income > 46_000) { temp += (income - 74_000) / tax3; if (income > 120_000) { temp += (income - 100_000) / tax4; if (income > 220_000) { temp += (income - 220_000) / tax5; } } } } } System.out.println("the tax you need to pay is : " + temp); } }