title: True or False in c programming pertaining to while loop
body: <p>Can someone explain true false in c programming pertaining to this while loop? </p>
  
  <p>If 0 is false Done=0, and <code>while (!Done)</code> is suppose to be true and done = 1 is also true, then how does done=1 cause the loop to "break" or exit?</p>
  
  <pre><code>    done=0;
      while(!done)
      {
          c=getchar();
          switch(c)
          {
              case '1': 
              printf("Beverage  $8.00\n");
              total+= 8;
              break;
  
              case '2':
              printf("Candy       $3.00\n");
              total+= 3;
              break;
  
              case '3':
              printf("Sandwich $5.00\n");
              total+= 5;
              break;
  
              case '4':
              printf("Hot Dog.   $2.00\n");
              total+= 2;
              break;
  
              case '5':
              printf("Popcorn    $6.00\n");
              total+= 6;
              break;
  
              case '=':
              printf("Your choices are finished.\n");
              printf("The total is:$%.2f\n", total);
              printf("Please pay the cashier.\n");
              done=1;
              break;
  
              default:
              printf("I don't understand your choice, please try again.\n");
          }
      }
      return (0);
  }
  </code></pre>