title: find if the triangle is right, acute or obtuse angled
body: <p>I have to find out if a triangle is right, acute or obtuse angled from 3 given side lengths of the triangle.</p>
  
  <p>This is what I have until now: </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;math.h&gt;
  
  //Program that calculates the type of triangle
  int main(int argc, char *argv[]) {
  
      int x,y,z;
  
      printf("Type in the integer lengths of 3 sides of a triangle:\n");
      scanf("%d %d %d", &amp;x, &amp;y, &amp;z); //reads the user's inputs
      if((x&lt;=0) || (y&lt;=0) || (z&lt;=0)) {
        printf("This is not a triangle.\n");
      } else {
          if((x + y &lt;= z) || (x + z &lt;= y) || (y + z &lt;= x)) {
          printf("This is not a triangle.\n");
          } else {
  
              if( ((x * x) + (y * y) == (z * z)) || ((x * x) + (z * z) == (y * y)) || ((z * z) + (y * y) == (x * x)) ) {
                  printf("This is a right-angled triangle.\n");
              } else if( ( ((x * x) + (y * y) &lt; (z * z)) || ((x * x) + (z * z) &lt; (y * y)) || ((z * z) + (y * y) &lt; (x * x)) ) || ( ( x&lt;=z &amp;&amp; y&lt;=z ) || ( x&lt;=y &amp;&amp; z&lt;=y ) || ( y&lt;=x &amp;&amp; z&lt;=x ) ) ) {
                  printf("This is an acute-angled triangle.\n");
              } else if( ( ((x * x) + (y * y) &gt; (z * z)) || ((x * x) + (z * z) &gt; (y * y)) || ((z * z) + (y * y) &gt; (x * x)) ) || ( ( x&gt;z &amp;&amp; y&gt;z ) || ( x&gt;y &amp;&amp; z&gt;y ) || ( y&gt;x &amp;&amp; z&gt;x ) ) ) {
                  printf("This is an obtuse-angled triangle.\n");
              } else {
                  printf("Not a triangle\n");
              }
  
          }
    }
  
    return 0;
  }
  </code></pre>
  
  <p>But I keep receiving the same error "This is an acute-angled triangle" for obtuse-angled triangles like 10, 10, 11</p>
  
  <p>Any idea what I am doing wrong?</p>
  
  <p>Thank you</p>