title: Calculating User Input Percentage in C
body: <p>For homework I have to calculate a percent discount from user input percentages in C, every time I run this program it returns the result as the original price and not with the discounted percentage(For Homework I was told to do this without the percentage operator.)</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(){
  
      double price_book;
      int percent;
      double grand_total;
  
      printf("What is the price of the book?\n");
              scanf("%lf", &amp;price_book);
  
      printf("The Price of the book before discount is %.2lf\n\n",price_book);
  
  
      printf("How much percent discount is to be applied?\n");
              scanf("%d", &amp;percent);
  
      grand_total = (100-percent)/100 * price_book;
  
      printf("\nThe total after discount is %.2lf\n", &amp;grand_total);
  
      return 0;
  }
  </code></pre>