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
(True/False) Unix is written in the C language. *<br> True<br> O False
Katarina [22]

Answer:

false

Explanation:

8 0
2 years ago
Read 2 more answers
The enforcement of OSHA standards is provided by federal and state
Gnoma [55]

Answer:

Explanation:

Enforcing OSHA, Occupational Safety and Health Administration, standards is not a job for electricians, lawmakers or tax collectors. The right answer is safety inspectors.

3 0
2 years ago
A tank with some water in it begins to drain. The function v ( t ) = 46 − 3.5 t determines the volume of the water in the tank (
olchik [2.2K]

Answer with Explanation:

Part a)

The volume of water in the tank as a function of time is plotted in the below attached figure.

The vertical intercept of the graph is 46.

Part b)

The vertical intercept represents the volume of water that is initially present in the tank before draining begins.

Part c)

To find the time required to completely drain the tank we calculate the volume of the water in the tank to zero.

0=46-3.5t\\\\3.5=46\\\\\therefore t=\frac{46}{3.5}=13.143minutes

Part d)

The horizontal intercept represents the time it takes to empty the tank which as calculated above is 13.143 minutes.

7 0
3 years ago
​Write 83,120 in expanded form using powers of 10.
maksim [4K]

Answer:

8*10000+3*1000+1*00+2*10+2

Explanation:

8 0
2 years ago
I will Brainlist<br> "Burning and Inch". Describe this measurement.
MAVERICK [17]

Answer:

what measurement

Explanation:

8 0
2 years ago
Read 2 more answers
Other questions:
  • The moisture in hot, humid, stagnant air surrounding a cold-water pipeline continually diffuses to the cold surface where it con
    14·1 answer
  • Ammonia enters the expansion valve of a refrigeration system at a pressure of 1.4 MPa and a temperature of 32degreeC and exits a
    15·1 answer
  • A brittle intermetallics specimen is tested with a bending test. The specimen's width 0.45 in and thickness 0.20 in. The length
    5·1 answer
  • A 450 MWt combined cycle plant has a Brayton cycle efficiency of 24% and a Rankine cycle efficiency of 29% with no heat augmenta
    6·1 answer
  • A coin placed 30.8 cm from the center of a rotating, horizontal turntable slips when its speed is 50.8 cm/s.
    12·1 answer
  • Which section of business plan should be the bulk of the plan
    7·1 answer
  • Write a Nested While Loop that will increment the '*' from 1 to 10.
    6·1 answer
  • Why is electricity considered a secondary source of energy
    6·1 answer
  • Time left 0:35:32 Three steel rod (E = 200 GPa) supports 36 KN Load P. Each of the rods AB and CD has a 200 mm? cross- sectional
    13·1 answer
  • You may wonder who the rest goes
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!