title: Adding and subtracting vulgar fractions
body: <p>I'm trying to add two vulgar fractions together by finding the lowest common denominator and then adding. However, my code isn't behaving as expected, and is outputting two very high negative numbers. When I change the second fraction to 3/15 it outputs 0/0. </p>
  
  <p>Here is my main program code:</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          Fraction n = new Fraction(2, 4);
          Fraction z = new Fraction(3, 12);
  
          Fraction sum = n.Add(z, n);
          int num = sum.Numerator;
          int den = sum.Denominator;
  
          Console.WriteLine("{0}/{1}", num, den);
          Console.ReadKey(true);
      }
  }
  </code></pre>
  
  <p>Here is my <code>Fraction</code> class code:</p>
  
  <pre><code>internal class Fraction
  {
      public Fraction(int numerator, int denominator)
      {
          Numerator = numerator;
          Denominator = denominator;
      }
  
      public int Numerator { get; private set; }
  
      public int Denominator { get; private set; }
  
      public Fraction Add(Fraction fraction2, Fraction fraction8)
      {
          int lcd = GetLCD(fraction8, fraction2);
  
          int x = lcd/fraction8.Denominator;
          int n = lcd/fraction2.Denominator;
          int f2num = fraction2.Numerator*n;
          int f8num = fraction8.Numerator*x;
  
          int t = fraction2.Numerator;
  
          Fraction Fraction3 = new Fraction(f2num+f8num,lcd);
  
          return Fraction3;
      }
  
  
  
      public int GetLCD(Fraction b, Fraction c)
      {
          int i = b.Denominator;
          int j = c.Denominator;
  
          while (true)
          {
  
              if (i == j)
              {
                  return i;
              }
              j = j + j;
              i = i + i;
          }
      }
  }
  </code></pre>