#include <stdio.h>
int main()
{
// Declaring the variables
float weight, shippingcost;
int miles;
// getting the value of weight entered by the user
printf("weight (in Pounds):");
scanf("%f", &weight);
/* If the weight is more than 50 pounds
* then it will not be delivered
*/
if (weight > 50)
{
printf("** Overweight.This package will not be shipped
**\n");
}
else
{
// Getting the miles entered by the user
printf("Miles :");
scanf("%d", &miles);
// Based on weight and no of miles calculating the shipping
cost
if (weight <= 10)
{
if (miles < 500)
{
shippingcost = 2;
}
else if (miles >= 500)
{
shippingcost = (miles / 500) * 2;
if (miles % 500 < 500 && miles % 500 != 0)
shippingcost += 2;
}
}
else if (weight > 10 && weight <= 50)
{
if (miles < 500)
{
shippingcost = 4.50;
}
else if (miles >= 500)
{
shippingcost = (miles / 500) * 4.50;
if (miles % 500 < 500 && miles % 500 != 0)
shippingcost += 4.50;
}
}
// Displaying the shipping cost
printf("Your Shipping Charge is :$ %.2f", shippingcost);
}
return 0;
}
___________________
Output:
_____________Could you rate me well.Plz .Thank You
PSLAYER 09/27/2017 yo October 9,2017 Graduation st Monday at T2:43 AM Shipping Calculator: Global Courier Services...
Global Courier Services will ship your package based on how much it weighs and how far you are sending the package. (visual studio or dev c) You need to write a design tool and a program in C that calculates the shipping charge based on weight and distance and the total cost. The shipping rates are as follows: BASED ON WEIGHT Charge 10 dollars for all package weighing 10 pounds or less Charge an additional 2 dollars per pound for...
C PROGRAMMING Introduction In this part, you will solve a problem described in English. Although you may discuss ideas with your classmates, etc., everyone must write and submit their own version of the program. Do NOT use anyone else’s code, as this will result in a zero for you and the other person! Shipping Calculator Speedy Shipping Company will ship your package based on the weight and how far you are sending the package, which can be anywhere in the...