title: Simple C program to find total amount of rupees from total number of coins.
body: <p>I am trying to write a C program to input number of coins for 25 paise, 50 paise, 1 rupee and 2 rupees and calculate total amount in rupees. This is my code. I am not getting the correct result. </p>
  
  <p>For example for 5 coins of 25 paise, I should get Rs 1.25. But I am getting Rs 1.00. I am very new to C. Please indicate my mistake </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  //Q 7d 2011 7th paper Honours 2008 syllabus
  int main()
  
  {
  int paise25, paise50, rs1, rs2;
  double total;
  printf("\n Number of coins of:\n\n");
  printf(" 25 paise    = ");
  scanf("%d",&amp;paise25);
  printf(" 50 paise   = ");
  scanf("%d",&amp;paise50);
  printf(" 1 rupee = ");
  scanf("%d",&amp;rs1);
  printf(" 2 rupee      = ");
  scanf("%d",&amp;rs2);
  
  total=paise25/4 + paise50/2 + rs1 + 2*rs2;
  //if(stat&lt;40 || chemistry&lt;40 || physics&lt;40 || math&lt;40 || c&lt;40)
  
  printf("\n Total amount in rupees: Rs %.02f\n",total);
  
  return 0;
  }
  </code></pre>