title: Wrong output in printf
body: <p>I'm new to C and trying to learn as best I can. I have this problem which I solved and the logic works pretty good, but whenever there is a wrong input it shows the message on screen and plus that the condition is not true. So whenever there is supposed to be an Invalid Input message I also get NE - which is what it would print out if the condition isn't true.</p>
  <p>This is the code:</p>
  <pre><code>#include &lt;stdio.h&gt; 
  #include &lt;stdlib.h&gt;
  
  int main() {
      int a, b;
      scanf(&quot;%d %d&quot;, &amp;a, &amp;b);
      if(a &lt;= 0 || b &lt;= 0) {
          printf(&quot;Invalid input&quot;);
      } else {
          if(a &lt; b) {
              int tmp = a;
              a = b;
              b = tmp;
          }
      }
      a/=10;
      int c1,c2;
      while (a!=0 &amp;&amp; b!=0){
          c1 = a%10;
          c2 = b%10;
          a /= 100;
          b /= 10;
      }
      if (c1 == c2)
          printf(&quot;PAREN\n&quot;);
      else
          printf (&quot;NE\n&quot;);
      return 0;
  }
  </code></pre>