title: determining the proper loop to use
body: <p>I am trying to teach myself C.  For fun and for my own development, I have created a code that prompts the user for a letter grade, then outputs the range of that letter grade.  Here is what I have so far:</p>
  
  <pre><code>//Ted C. Lim
  
  #include "stdio.h"
  
  
  int main()
  {
  char grade;
  
      printf("Enter a single character grade: ");
      scanf("%c", &amp;grade);
      printf("You entered %c as the grade.  ", grade);
  
      switch(grade)
      {
          case 'A':
              printf("The grade range for A and A- is 100%% - 90%%.");
              break;
          case 'B':
              printf("The grade range for B and B- is 80%% - 89%%.");
              break;
          case 'C':
              printf("The grade range for C and C- is 70%% - 79%%.");
              break;
          case 'D':
              printf("The grade range for D and D- is 60%% - 69%%.");
          case 'F':
              printf("The grade range for F is 0%% - 59%%.");
          default:
              printf("That grade does not exist.");
              break;
      }
  
  
  }
  </code></pre>
  
  <p>If you run the program, you will see that it asks the user only once, returns the proper output, then stops.  What I would <em>like</em> to do is repeat the prompt indefinitely until the user inputs something like 'Q' to quit.  I know I should use some sort of loop here, but I'm not quite sure how to apply it.</p>