title: Getting error: "variable cannot appear in a constant-expression"
body: <p>I've made a basic code in C-Free5.0, if do same as in <strong>if</strong> statement all showing good. but when I use a switch it gives the error: 'per' cannot appear in a Constant-expression, why its give the error?</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  int main()
  {
      int urdu=134;
      int eng=112;
      int isl=72;
      int ps=58;
      int maths=137;
      int phy=128;
      int chem=120;
      int bio=115;
  
      int total=(urdu+eng+isl+ps+maths+phy+chem+bio);
      int per=(total*100)/1050;
  
      printf("Urdu=               %d\n", urdu);
      printf("English=            %d\n", eng);
      printf("Islmiyat=           %d\n", isl);
      printf("Pakistan Studies=   %d\n", ps);
      printf("Mathematics=        %d\n", maths);
      printf("Physics=            %d\n", phy);
      printf("Chemistery=         %d\n", chem);
      printf("Biology=            %d\n\n", bio);
  
      printf("Percentage:         %d\n",per);
  
      switch(per)
      {
          case (per&gt;80):
          printf("A+");
  
          case (per&gt;70):
          printf("A");
      }
      getch();
  }
  </code></pre>