title: Java IRS Tax Calculation/if Else statements/Married or single
body: <p>I've been tasked with creating a small IRS makeshift tax calculator.
  The assignments objectives to be completed are:</p>
  
  <p>Write a class that
  prompts the user for the following information:</p>
  
  <p>Filing status: Single or Married (entered as 1 for Single and 2 for Married)</p>
  
  <p>Taxable income</p>
  
  <p>Calculates and prints:</p>
  
  <p>Filing status</p>
  
  <p>Taxable income</p>
  
  <p>Federal tax</p>
  
  <p>I'm supposed to have specific calculations for each of the parameters, which include 0 to 27050, 27050 to 65500, and so on, which are included in the code.
  the real problem I'm having is that I can't seem to get the numbers to actually show up.</p>
  
  <p>my code is the following:</p>
  
  <pre><code>import java.util.Scanner;
      public class P4_Icel_Murad_IRS
      {
          public static void main(String[] args){
              Scanner in = new Scanner(System.in);
              System.out.printf("Enter Marital Status: (Single = 1, Married = 2):");
              int relation = in.nextInt();
              System.out.printf("Enter taxable income:");
              int tax = in.nextInt();
              if (relation == 1){
                  String status = "Single";
                  if (tax &lt;= 27050){
                      double tax2 = tax - 0.0;
                      double tax3 = (tax2 * 0.15);
                      System.out.printf(status,tax,tax3);
                  }else if (27050 &lt; tax &amp;&amp; tax &gt;= 65550){
                      double tax2 = (tax - 27050.0)* 0.275;
                      double tax3 = 4057.5 + tax2;
                  }else if (65550 &lt; tax &amp;&amp; tax &lt;= 136750){
                      double tax2 = (tax - 65550.0) * 0.305;
                      double tax3 = 14645.0 + tax2;
                  }else if (136750 &lt; tax &amp;&amp; tax &lt;= 297350){
                      double tax2 = (tax - 136750.0 - tax) * 0.355;
                      double tax3 = 36361.00 + tax2;
                  }else if (297350 &lt; tax &amp;&amp; tax &lt;= 1e100){
                      double tax2 = (tax - 297350) * 0.391;
                      double tax3 = 93374.0 + tax2;
                  }
              }
                  if (relation == 2){
                  String status = "Married";
                  if (tax &lt;= 27050){
                      double tax2 = tax - 0.0;
                      double tax3 = (tax2 * 0.15);
                      System.out.printf(status,tax,tax3);
                  }else if (27050 &lt; tax &amp;&amp; tax &gt;= 65550){
                      double tax2 = (tax - 27050.0)* 0.275;
                      double tax3 = 4057.5 + tax2;
                  }else if (65550 &lt; tax &amp;&amp; tax &lt;= 136750){
                      double tax2 = (tax - 65550.0) * 0.305;
                      double tax3 = 14645.0 + tax2;
                  }else if (136750 &lt; tax &amp;&amp; tax &lt;= 297350){
                      double tax2 = (tax - 136750.0 - tax) * 0.355;
                      double tax3 = 36361.00 + tax2;
                  }else if (297350 &lt; tax &amp;&amp; tax &lt;= 1e100){
                      double tax2 = (tax - 297350) * 0.391;
                      double tax3 = 93374.0 + tax2;
                  }
              }    
  
          }
      }
  </code></pre>