title: How is my simple if-else statement unreachable code?
body: <p>Honestly am shocked I am getting an error. I'm a junior CS major and I can't get this simple program to work. Clion says these two lines are unreachable, yet my test cases seem to work.</p>
  
  <p>Code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  int main() {
  
      string s = "";
      while(s != "|") {
          int val1 = 0;
          int val2 = 0;
          cin &gt;&gt; val1;
          cin &gt;&gt; val2;
          if(val1 == val2) {
              cout &lt;&lt; "the numbers are equal.\n";
          } else {
              cout &lt;&lt; "the smaller value is: " &lt;&lt; min(val1, val2) &lt;&lt; '\n'; // Says these two 
              cout &lt;&lt; "the larger value is: " &lt;&lt; max(val1, val2) &lt;&lt; '\n'; // lines are unreachable
          }
          cin &gt;&gt; s;
      }
  
      return 0;
  }
  </code></pre>
  
  <p>Test Cases:</p>
  
  <pre><code>3 3
  the numbers are equal.
  f
  4 5
  the smaller value is: 4
  the larger value is: 5
  |
  
  Process finished with exit code 0
  </code></pre>
  
  <p>If this code is so unreachable than how come my program reached it?</p>