title: A short program that takes input lower case letters it gives the upper case letters and exits at when the enter key is pressed
body: <p>The conversion works correctly but when I press enter, when asked for a lower case, it executes an enter (\n) and doesn't exit or stop.</p>
  
  <p>This is my program:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;math.h&gt;
  
  
  
  main()
  {
   char ch;
   printf("Press a letter: ");
   while (scanf(" %c",&amp;ch)!='\n')
      {
          printf("%c\n",ch-32);     
      }
  
  
  }
  </code></pre>