title: I am creating a simple program to calculate sales totals involving if/else and keep getting an error message
body: <p>The program calculates discounts (if the customer is a teacher) and sales tax and finds the sales total. I keep getting the error: </p>
  
  <blockquote>
    <p>[Warning] comparison between pointer and integer [enabled by default]</p>
  </blockquote>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;math.h&gt;
  
  #define SALES_TAX .05
  #define DISCOUNT_LOW .10
  #define DISCOUNT_HIGH .12
  #define DISCOUNT_LIMIT .100
  
  int main(void)
  {
      double purchase_total;
      double discount;
      double discounted_total;
      double sales_tax;
      double total;
      int teacher;
      FILE* output_file;
  
      /* request inputs */
      printf("Is the customer a teacher (y/n)?");
      scanf("%d", &amp;teacher);
      printf("Enter total purchases.");
      scanf("%lf", &amp;purchase_total);
  
      /* calculations for teacher */
      if (teacher == "y");
      {/*calculate discount (10% or 12%) and 5% sales tax */
          /* purchase total less than 100 */
          if (purchase_total &lt; 100)
          {
              /* calculate 10% discount */
              discount = purchase_total * DISCOUNT_LOW;
              discounted_total = purchase_total - discount;
          }
  
          /*purchase total greater than 100 */
          else
          {   /* calculate 12% discount */
              discount = purchase_total * DISCOUNT_HIGH;
              discounted_total = purchase_total - discount;
          }
  
          printf("Total purchases    $%f\n", purchase_total);
          printf("Teacher's discount (12%%)    %fs\n", discount);
          printf("Discounted total     %f\n", discounted_total);
          printf("Sales tax (5%%)    %f\n", sales_tax);
          printf("Total     $%f\n", total);
      }
  
  
      /* calculation for nonteacher */
      if (teacher =="n");
      {
          /* calculate only 5% sales tax */
          sales_tax = purchase_total *  sales_tax;
          total = purchase_total + sales_tax;
  
          printf("Total purchases    $%f\n", purchase_total);
          printf("Sales tax (5%%)    %f\n", sales_tax);
          printf("Total     $%f\n", total);
      }
  
      return (0);
  }
  </code></pre>