title: Do...While loop with logical operators
body: <p>I copied a simple "calculator" example from my textbook that accepts 2 values and an operator. However, it does not check if the expression entered is valid. The code should prompt the user until a proper expression is entered. </p>
  
  <p>How should I fix it with my style in mind? What is a better way of doing this?</p>
  
  <pre><code>/*
  Input: A simple expression with 2 values and 1 operator
  Format: value1 (operator) value2
  Ex: 5*5
  Output: Answer
  */
  
  #include &lt;stdio.h&gt;
  
  int main (void)
  {
  float value1, value2;
  char operator = ' ';
  
  //Issue Area, the while section does not work
  do
  {
      printf ("Type in your expression:");
      scanf ("%f %c %f", &amp;value1, &amp;operator, &amp;value2);
  }
  while ((operator != '+' || operator != '-' || operator != '*' || operator != '/'));
  
  //This is fine, code is for an else...if example in textbook
  if (operator == '+')
      printf ("%.2f\n",value1 + value2);
  else if (operator == '-')
      printf ("%.2f\n",value1 - value2);
  else if (operator == '*')
      printf ("%.2f\n",value1 * value2);
  else if (operator == '/')
      printf ("%.2f\n",value1 / value2);
  
  return 0;
  }
  </code></pre>