title: how to use switch cases in a while loop
body: <p>My concern is that the program is only running once...
  In this assignment we will develop an application to calculate the area and 
  perimeter of geometric shapes. First the user is asked to enter a letter representing 
  the shape. We use C for circle, R for rectangle and S for square. 
  After the user chooses the shape, the program prompts for the appropriate 
  dimensions of the shape accordingly. For instance, if the user has chosen a square, 
  the program will ask for a side. If it’s a circle, the program will ask for radius. If 
  it’s a rectangle, it will ask for length and width. 
  Upon receiving the appropriate dimensions, the program will calculate the area and 
  the perimeter of the requested shape and print it on the screen. And again, the code 
  will ask for another letter. If the user enters ‘Q’ the program terminates. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main()
  {
      float PI = 3.1415;
      char choice;
      float area, parameter;
      int radius, side, length, width;
  
      do{
          printf("Please enter a shape(C:Circle, S:Square, R:Rectangle, Q:Quiit&gt; ");
          scanf("%s", &amp;choice);
  
          switch(choice){
          case 'C':
              printf("Enter a radius of the circle: ");
              scanf("%d", &amp;radius);
              area = (2*radius)*PI;
              parameter = 2*PI*radius;
              printf("The area of the circle is %.02f and parameter is %.02f", area, parameter);
          break;
  
          case 'S':
              printf("Enter the side of the square: ");
              scanf("%d", &amp;side);
              area = side * side ;
              parameter = 4*side;
              printf("The area of the circle is %.02f and parameter is %.02f", area, parameter);
          break;
  
          case 'R':
              printf("Enter the width of the rectangle: ");
              scanf("%d", &amp;width);
              printf("Enter the length of the rectangle: ");
              scanf("%d", &amp;length);
              area = length*width;
              parameter = (2*length)+(2*width);
              printf("The area of the circle is %.02f and parameter is %.02f", area, parameter);
          break;
  
          case 'Q':
              printf("Thank and bye");
          break;
  
          default:
              printf("Invalid input");
  
      }
          return 0;
      } while (choice != 'Q');
  }
  </code></pre>