title: While loop - changing string variable
body: <p>As a newbie to c programming (I've only had experience in visual basic), I'm not entirely sure how a while loop with a changing string variable in its condition statement should function. </p>
  
  <p>The following code is a simple calculator that I was making that allows the user to input an operation and two numbers, then output the respective result. I'am trying to code in a while loop that continually repeats the procedure until the user decides to exit it. However it seems that the line scanf("%c", &amp;quit); isn't affecting the while loop condition statement. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() {
  float num1, num2;
  char operation;
  char quit = "n";
  while (quit = "n"){
  printf("Enter an operator (+, -, *, /) \n");
  scanf(" %c", &amp;operation);
  printf("Enter the numbers you wish to carry out the operation on \n");
  scanf("%f %f", &amp;num1, &amp;num2);
      switch(operation) {
          case '+':
              printf("%f\n", num1+num2);
              break;
          case '-':
              printf("%f\n", num1-num2);
              break;
          case '*':
              printf("%f\n", num1*num2);
              break;
          case '/':
              printf("%f\n", num1/num2);
              break;
  
      }
  printf("Would you like quit the program, is so enter 'y' \n");
  scanf("%c", &amp;quit);
  }
  return 0;
  }
  </code></pre>
  
  <p>Thanks for all your help in advance.</p>