title: Know which type of triangle is in c++
body: <p>Well, I need to make a program that should know which type of triangle is, the user will enter the size of each side of the triangle and then it will print which type of triangle is (scalene, isosceles, equilateral), I'm a very newbie "programmer" (less than half-month), anyway this is what I have:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  
  using namespace std;
  int main(){
  
      int num1;
      int num2;
      int num3;
  
      cout &lt;&lt; "first number" &lt;&lt; endl;
      cin &gt;&gt; num1;
      cout &lt;&lt; "second number" &lt;&lt; endl;
      cin &gt;&gt; num2;
      cout &lt;&lt; "third number"  &lt;&lt; endl;
      cin &gt;&gt; num3;
  
      if (num1 == num2 == num3){
          cout &lt;&lt; "it's equilateral" &lt;&lt; endl;
      }
  
      else if (num1 != num2 != num3){
          cout &lt;&lt; "it's scalene" &lt;&lt; endl;
      }
  
      return 0;
  }
  </code></pre>
  
  <p>Why my code doesn't work correctly? for example: I enter 1 for the first, then 1 for the second, then 2 for the third, and it gaves me it's scalene, but if I wrote num1 != num2 != num3, I know this can be stupid but I'm just learning. Thanks.</p>