#include <stdio.h>
main(){
double weight, miles, shippingCharge;
printf("Enter the weight of your package: ");
scanf_s("%lf", &weight);
printf("Enter how many miles the package will be traveling: ");
scanf_s("%lf", &miles);
if (weight <= 2){
shippingCharge = 1.50;
printf("Your shipping charge is: %.2lf", shippingCharge);
}
else {
if (weight < 6){
shippingCharge = 3.70;
printf("Your shipping charge is: %.2lf", shippingCharge);
}
else {
if (weight < 10){
shippingCharge = 5.25;
printf("Your shipping charge is: %.2lf", shippingCharge);
}
else {
if (weight >= 10){
printf("Sorry, we will not ship your package.");
}
}
}
}
system("pause");
}
Copyright © 2024, NextGenUpdate.
All Rights Reserved.