title: Shipping calculator not showing correct price
body: <p>I'm trying to make a program in C that is a shipping calculator, which calculates the shipping price. The program would work as follows. First, the user would type the weight in pounds and the distance in miles. The program then reports to the user how much he or she should pay for the shipping based on the number of pounds and shipping. If I type the weight at 1.5 pounds and distance in miles that is more than 0 miles but less than or equal to 500 miles, the price shows up correctly, which is $3. However, if the weight is more than 10 pounds and less than or equal to 50 pounds, instead of the price showing up as $5, it still shows up at $3. This issue does not only occur when I type the number of pounds, but also when I type the distance. For instance, if I type 5 pounds and then type 700 miles, the shipping price still shows up at $3 instead of $6. I have researched online to see where the problem could be but no luck, unfortunately. The code for the program is as follows:</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main () {
  
  double packageWeight, packdistanceMiles,packPrice, totalPrice;
  
  
  printf(&quot;Please enter package weight: &quot;);
  scanf(&quot;%lf&quot;, &amp;packageWeight);
  printf(&quot;The package weight is: %.2lf \n&quot;, packageWeight);
  system(&quot;pause&quot;);
  printf(&quot;Please enter how far the package will be sent in miles: &quot;);
  scanf(&quot;%lf&quot;, &amp;packdistanceMiles);
  printf(&quot;The distance entered in miles is: %.2lf \n&quot;, packdistanceMiles);
  system(&quot;pause&quot;);
  
  
  
  
  if(packdistanceMiles==0)
  
      printf(&quot;You must enter a distance that is more than zero, close the program and try again \n&quot;);
  
  else
     
  if(packageWeight&gt;50)
              
  printf(&quot;Sorry, we do not ship packages that weight more than 50 pounds&quot;);
     
  if(packageWeight&gt;0 || packageWeight &lt;=10)
               packPrice = 3.00;
      
  if(packageWeight&gt;10 || packageWeight &lt;=50)
               packPrice = 3.00;
  else
  
     
  if(packdistanceMiles&gt;0 || packdistanceMiles &lt;=500)
          totalPrice = packPrice;
     
  if(packdistanceMiles&gt;500 || packdistanceMiles &lt;=1000)
          totalPrice = 2* packPrice;
     
  if(packdistanceMiles&gt;1000 || packdistanceMiles &lt;=1500)
          totalPrice = (2* packPrice)+10;
     
  if(packdistanceMiles&gt;1500 || packdistanceMiles &lt;=2000)
          totalPrice = (3* packPrice)+10;
     
  if(packdistanceMiles&gt;2000 || packdistanceMiles &lt;=2500)
          totalPrice = (4* packPrice)+10;
     
  if(packdistanceMiles&gt;2500 || packdistanceMiles &lt;=3000)
          totalPrice = (5* packPrice)+10;
     
  if(packdistanceMiles&gt;3000 || packdistanceMiles &lt;=3500)
          totalPrice = (6* packPrice)+10;
     
  if(packdistanceMiles&gt;3500 || packdistanceMiles &lt;=4000)
          totalPrice = (7* packPrice)+10;
     
  if(packdistanceMiles&gt;4000 || packdistanceMiles &lt;=4500)
          totalPrice = (8* packPrice)+10;
     
  if(packdistanceMiles&gt;4500 || packdistanceMiles &lt;=5000)
          totalPrice = (9* packPrice)+10;
     
  if(packdistanceMiles&gt;5000 || packdistanceMiles &lt;=5500)
          totalPrice = (10* packPrice)+10;
     
  if(packdistanceMiles&gt;5500 || packdistanceMiles &lt;=6000)
          totalPrice = (11* packPrice)+10;
  
         
  printf(&quot;The shipping price is %.2lf \n&quot;, packPrice);
         
  system(&quot;pause&quot;);
  
  
  return 0;
  
  
  
  }
  </code></pre>