title: Why is my code giving me the wrong answer to this math q uestion?
body: <p>My apologies if the title is a bit confusing I had some trouble trying to word what I was trying to say.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public class Assignment3 {
  
      public static void main(String[] args) {
          int A = 100;
          int B = 20;
          int C = 30;
          int X = 4 * A;
          int Y = 3 * (B + C);
          int Z = X / Y;
  
          System.out.println("The value of A is " + A + ".");
          System.out.println("The value of B is " + B + ".");
          System.out.println("The value of C is " + C + ".");
          System.out.println("The answer is " + Z + ".");
  
      }
  
  }
  </code></pre>
  
  <p>It keeps giving me 2 as the answer when I know the answer is 2.6 repeating. Any ideas why and how I can fix it? Thanks in advance.</p>