title: New to coding and would like some pointers regarding my Objective C code
body: <p>I'm working my way through Stephan Kochan's book on Objective C and I've come up against a problem which I'm hoping someone can help with.</p>
  
  <p>Here's my print method from a Fraction class that I've been working on:</p>
  
  <pre><code>-(void) print: (BOOL) reduce {
  Fraction *resultReduced = [[Fraction alloc] init];
  [resultReduced setTo:numerator over:denominator];
  
  if (denominator &lt; 0) {
      numerator = -numerator;
      denominator = -denominator;
  }    
  if (reduce) {
      [resultReduced reduce];
      if (resultReduced.denominator &lt; 0) {
          resultReduced.denominator = -resultReduced.denominator;
          resultReduced.numerator = -resultReduced.numerator;
      }
      else if (resultReduced.denominator == 1)
          NSLog (@"%i", resultReduced.numerator);
      else if (resultReduced.numerator == 0)
          NSLog (@"0");
      else if (resultReduced.numerator == resultReduced.denominator)
          NSLog (@"1");
      else if (resultReduced.numerator &gt; resultReduced.denominator || resultReduced.numerator &lt; 0) {
          [resultReduced improper];
          if (resultReduced.whole == 0)
              NSLog (@"%i/%i", resultReduced.numerator, resultReduced.denominator);
          else if (resultReduced.whole &lt; 0 &amp;&amp; resultReduced.numerator &lt; 0) {
              resultReduced.numerator = -resultReduced.numerator;
              NSLog (@"%i %i/%i", resultReduced.whole, resultReduced.numerator, resultReduced.denominator);             
          }
          else
              NSLog (@"%i %i/%i", resultReduced.whole, resultReduced.numerator, resultReduced.denominator);
      }
      else
          NSLog (@"%i/%i", resultReduced.numerator, resultReduced.denominator);
  }
  else
      NSLog (@"%i/%i", numerator, denominator);
  </code></pre>
  
  <p>}</p>
  
  <p>The problem is that if I subtract 15/4 from 2/3 I get -37/12 which I'd like to display as -3 1/12 using this message [resultReduced improper] but it doesn't appear to work.  If I change</p>
  
  <p><code>else if (resultReduced.numerator &gt; resultReduced.denominator || resultReduced.numerator &lt; 0) {</code></p>
  
  <p>to just if then it does.</p>
  
  <p>Could someone please explain to me why using if works, but if else doesn't?</p>