title: C language yes or no if statement with a char?
body: <pre><code>#include &lt;stdio.h&gt;
  int main(void)
  {
      char fever, cough; /*Sets the chars.*/
  
      printf("Are you running a fever? (y/n)\n"); /*Asks if they have a fever and saves their input.*/
      scanf("%c",&amp;fever);
  
      printf("Do you have a runny nose/cough? (y/n)\n"); /*Asks if they have a cough and saves their input.*/
      scanf(" %c",&amp;cough);
  
      printf("Please verify the folling information.\nFever: %c \nRunny nose/cough: %c \n",fever,cough); /*Asks if the following info is correct.*/
  
  
      if ((fever=y) &amp;&amp; (cough=y))
      printf("Your recommendation is to see a doctor.");
  
      else if ((fever=n) &amp;&amp; (cough=y))
      printf("Your recommendation is to get some rest.");
  
      else if ((fever=y) &amp;&amp; (cough=n)
      printf("Your recommendation is to see a doctor.");
  
      else
      printf("Your are healthy.");
  return 0;
  }
  </code></pre>
  
  <p>I get errors for the y's and n's</p>