1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
3241004551 [841]
3 years ago
14

Global Courier Services will ship your package based on how much it weighs and how far you are sending the package. Packages abo

ve 100 pounds will not be shipped. You need to write a program in C that calculates the shipping charge.
Engineering
1 answer:
denis23 [38]3 years ago
8 0

Answer:

The code will be:

#include <stdio.h>

#include <stdlib.h>

main () {

double weight, shippingCharge, rate, segments;

int distance;

printf("Enter the weight: \n");

scanf("%lf", &weight);

printf("Enter the distance: \n");

scanf("%i", &distance);

if (weight <= 10) {

printf("Rate is $3.00 \n");

rate = 3;

} else {

printf("Rate is $5.00 \n");

rate = 5;

}

if (distance % 500 == 0) {

segments = distance / 500;

} else {

segments = distance / 500 + 1;

}

shippingCharge = rate * segments;

if (distance >1000) {

shippingCharge = shippingCharge + 10;

}

printf("Your shipping charge is $%lf\n", shippingCharge);

system ("pause");

}

You might be interested in
What kind of car is this
juin [17]

Answer:

camaro

Explanation:

5 0
3 years ago
Read 2 more answers
I WILL GIVE 20 POINTS!!
Alex777 [14]

Answer:

Use a resume header

Explanation:

Create a Summary

Research industry, employer keywords

there are some hints okay

5 0
3 years ago
Read 2 more answers
Find the Thevenin Equivalent.
arlik [135]

Answer:

hindi ko po gets

Explanation:

paulit po ng picture

4 0
3 years ago
Read 2 more answers
Which of the following describes a logic bomb?
dem82 [27]

Answer:

A piece of code hidden in spread sheet

8 0
3 years ago
Determine the design stress for bolts in a cylinder cover where the load is fluctuating due to gas pressure. The maximum load on
Svetach [21]

Sorry I'm new and need points ty

3 0
3 years ago
Other questions:
  • For the R function shown below(Attachment):
    5·1 answer
  • I have a plot plan with an angle of 35 degrees on the main lot, how will this affect the construction of the basement
    9·1 answer
  • Consider the fully developed flow of glycerin at 40°C through a 60-m-long, 4-cm-diameter, horizontal, circular pipe. If the flow
    15·1 answer
  • Does the Diesel engine have engine knock or detonation problem? Why?
    6·1 answer
  • Who is the best musician in Nigeria<br>​
    11·2 answers
  • An aircraft component is fabricated from an aluminum alloy that has a plane strain fracture toughness of 40 MPa . It has been de
    7·1 answer
  • A beam spans 40 feet and carries a uniformly distributed dead load equal to 2.2 klf (not including beam self-weight) and a live
    15·1 answer
  • A solid cylindrical workpiece made of 304 stainless steel is 150 mm in diameter and 100 mm is high. It is reduced in height by 5
    12·1 answer
  • The heat transfer surface area of a fin is equal to the sum of all surfaces of the fin exposed to the surrounding medium, includ
    6·1 answer
  • Yeah this question might be difficult as most of the brainly community is math. Hope I can find at last one robotics person. ;-;
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!