title: Terminate a while loop using `getchar()`
body: <p>For my homework assignment, I need to implement Horners Algorithm for converting between bases. </p>
  
  <p>I have been told to use <code>getchar()</code> for this assignment. But I am having a problem where when I hit enter, the program doesn't terminate and just takes in more chars. </p>
  
  <p>Example: </p>
  
  <pre><code>bryce&gt; ./pa1
  Enter the fromRadix:16
  
  Enter the toRadix:2
  abc
  abc
  ^C
  bryce&gt; 
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>int readRadixA(int radixA)
  {
      char myChar = getchar(); 
      int result = 0; 
      int run = 0; 
  
      while(myChar != EOF)
      {
          if(myChar == "\n")
              break;
  
          Horners();
  
          myChar = getchar(); 
      }
  
      return result;
  }
  </code></pre>
  
  <p>I am not asking for help implementing Horners; I am asking for help to terminate the <code>getchar()</code> correctly. </p>