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
Match the word with the definition:
aksik [14]

1. Renewable Resources  = (Renewable means you can keep making it) =  resources that can be replenished (such as trees)

2. Nonrenewable Resources  =  ( Nonrenewable means it can't be made once it is used up) = resources that are gone once they are used (such as fossil fuels)

3. Producer  =  ( produces something) = person who makes goods or provides services

4. Consumer  = ( uses something) =   person whose wants are satisfied by using goods and services

5. Allocate  = ( put someplace) =   distribute

6. Choice =  option

7 0
3 years ago
Read 2 more answers
The best approach to keeping your car in safe working order is to
vovikov84 [41]

Answer:

Explanation:

In order to keep your car running at its best, it’s important to keep up with routine maintenance and inspections. By properly maintaining your vehicle, you’ll reduce future repair costs, optimize your car’s performance, maintain its value and extend its life. Here are some regular maintenance needs to keep in mind for your vehicle:

6 0
3 years ago
Read 2 more answers
A six-lane freeway (three lanes in each direction) with a 5.5% uphill grade 1.5 miles long has 10-ft lanes and obstructions 5 ft
sertanlavr [38]
The answer would be:
A. LOS B
4 0
3 years ago
Read 2 more answers
What Advantage does a voltmeter have over a noncontact voltage indicator when testing for voltage
galina1969 [7]

Answer:

Obviously you shouldn't rely just on the meter for your safety. You'd disconnect wall fuses or kill main switches before you start, using the meter just gives you some extra protection: with the meter you might notice for example that you've disconnected the wrong fuse and the unit is still live.

Explanation:

Hope it helps! :)

5 0
2 years ago
What flow type occurs when the heat exchanger has multiple passes and baffles?
Vanyuwa [196]
I think that the answer would be B or C
4 0
3 years ago
Other questions:
  • What is Not considered as metric system ? a. Length b. Mass c. Time d. Volume e. Temperature
    9·2 answers
  • Que es resistencia ?
    15·1 answer
  • HELP<br><br><br>the overall width of a part is dimensioned as 3.00 ± 0.02. what is the tolerance
    14·2 answers
  • One of the best ways to find a vacuum leak on a speed-density fuel-injection system is to read the intake air controller (LAC) c
    12·2 answers
  • Products. of sheet metal​
    8·1 answer
  • Pointssss 100 and brainliest :)
    5·1 answer
  • PLS HELP ME
    14·1 answer
  • What are the relevance of report writing
    9·1 answer
  • Explain what the ancient Romans did to solve the problem in the following scenario.
    10·1 answer
  • Recall the steps of the engineering design process. Compare and contrast the
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!