title: Basic Java Income Tax
body: <p>The Question:</p>
  
  <p>Write a program that prompts the user to enter his/her taxable income and then calculates the income tax due using the 2014 tax table below. Express the tax with two decimal places.</p>
  
  <pre><code>Income tax brackets for single-filers
  up to $9075          10%
  $9076 - $36900    15%
  $36901 - $89350       25%
  $89351 - $186350      28%
  $186351 - $405100   33%
  </code></pre>
  
  <p>This is what I have so far. I'm really new to Java so keep that in mind. My specific question will come after my code. </p>
  
  <pre><code>import java.util.Scanner;
  public class IncomeTax {    
  
  
  public static void main(String[] args) {
  
          Scanner input = new Scanner(System.in);
  
          // Prompt the user to enter taxable income
          System.out.print("Enter the amount of taxable income for the year 2014: ");
          double income = input.nextDouble();
  
          // Compute tax
          double tax = 0;
  
          if (income &lt;= 9075)
              tax = income * 0.10;
          else if (income &lt;= 9076)
              tax = 9075 * 0.10 + (income - 36900) * 0.15;
          else if (income &lt;= 36901)
              tax = 9075 * 0.10 + (9076 - 36900) * 0.15 + (income - 89350) * 0.25;
          else if (income &lt;= 89351)
              tax = 9075 * 0.10 + (9076 - 36900) * 0.15 + (36901 - 89350) * 0.25 + (income - 186350) + 0.28;
          else if (income &lt;= 186351)
              tax = 9075 * 0.10 + (9076 - 36900) * 0.15 + (36901 - 89350) * 0.25 + (89351 - 186350) + 0.28 + (income - 405100) + 0.33;
  
          if (income &lt;=  9075)
              System.out.println("You have entered the 10% bracket.");
          else if (income &lt;= 9076)
              System.out.println("You have entered the 15% bracket.");
          else if (income &lt;= 36901)
              System.out.println("You have entered the 25% bracket.");
          else if (income &lt;= 89351)
              System.out.println("You have entered the 28% bracket.");
          else if (income &lt;= 186351)
              System.out.println("You have entered the 33% bracket.");
      }
  }
  </code></pre>
  
  <p>The final output should look like this:</p>
  
  <p>Enter the amount of taxable income for the year 2014. (user input here ->) 5000</p>
  
  <p>You have entered the 10% tax bracket.</p>
  
  <p>Your income is $5,000.00, Your tax is: $500.00. Your income after tax is: $4,500.00</p>
  
  <hr>
  
  <p>How do I get my output to look like the above output? Specifically the decimals and the $ sign. </p>
  
  <p>The output code that I am currently working on is:</p>
  
  <pre><code>System.out.println("Your income is: " + "Your taxx is: " + (int)(tax * 100) / 100.0) + "Your income after tax is: " + ;
  </code></pre>