title: C Calculator code issue
body: <p>Solved. Thanks!</p>
  
  <p>I am a beginner in C programming. I wrote a simple calculator code and its working fine. Here's the code-</p>
  
  <pre><code>    #include&lt;stdio.h&gt;
  
  int main() {
  
      char operator;
      double firstNumber,secondNumber;
  
      printf("Enter an operator (+, -, *,/): \n");
      scanf("%c", &amp;operator);
  
      switch(operator)
      {
          case '+':
              printf("Enter two numbers: ");
              scanf("%lf %lf",&amp;firstNumber, &amp;secondNumber);
              printf("%.2f + %.2f = %.2f",firstNumber, secondNumber, firstNumber + secondNumber);
              break;
  
          case '-':
              printf("Enter two numbers: ");
              scanf("%lf %lf",&amp;firstNumber, &amp;secondNumber);       
              printf("%.2f - %.2f = %.2f",firstNumber, secondNumber, firstNumber - secondNumber);
              break;
  
          case '*':
              printf("Enter two numbers: ");
              scanf("%lf %lf",&amp;firstNumber, &amp;secondNumber);
              printf("%.2f * %.2f = %.2f",firstNumber, secondNumber, firstNumber * secondNumber);
              break;
  
          case '/':
              printf("Enter two numbers: ");
              scanf("%lf %lf",&amp;firstNumber, &amp;secondNumber);
              printf("%.2f / %.2f = %.2f",firstNumber, secondNumber, firstNumber / secondNumber);
              break;
  
          default:
              printf("Error! operator is not correct.\n");
      }
  
      return 0;
  }
  </code></pre>
  
  <p>I want that if the user enters a wrong operator then the program instead of ending goes back to the starting. Any idea of how to do it? 
  Thanks.</p>