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
The ruler game, HELPPPP PLS
Rasek [7]

Answer:

C

Explanation:

8 0
3 years ago
Read 2 more answers
Steam undergoes an isentropic compression in an insulated piston–cylinder assembly from an initial state where T1 5 1208C, p1 5
balu736 [363]

Answer:

temperature T2 = 826.9°C

\frac{W}{m} = -1142.7 kJ/kg

Explanation:

given data

initial state temperature = 120°C

final state pressure p1 = 1 bar

pressure p2 =  100 bar

solution

we use here super heated water table A6 that is

specific internal energy u1 = 2537.3 kJ/kg

specific entropy s1 = 7.4668 kJ/kg.K

and

here specific entropy stage 1 = stage 2

so for specific entropy and pressure 100 bar

specific internal energy u2 = 3680 kJ/kg

and temperature T2 = 826.9°C

so here now we get specific work of steam is

ΔU = -W     ...........1

m ( u1 - u2) = W

\frac{W}{m} = u1 - u2

\frac{W}{m} = 2537.3 - 3680

\frac{W}{m} = -1142.7 kJ/kg

3 0
3 years ago
A 3-m-high, 11-m-wide rectangular gate is hinged at the top edge at A and is restrained by a fixed ridge at B. Determine the hyd
serg [7]

Answer:

its a

Explanation:

its a

5 0
3 years ago
Handsaw teeth are very sharp: to avoid being cut by the teeth, keep hands and fingers well away from the
siniylev [52]
Handsaw teeth are very sharp: to avoid being cut by the teeth, keep hands and fingers well away from the
path of the blade
6 0
3 years ago
Read 2 more answers
For each topic, find the total number of blurts that were analyzed as being related to the topic. Order the result by topic id.
photoshop1234 [79]

Answer:

Explanation: see attachment below

8 0
3 years ago
Other questions:
  • Consider flow in between two parallel plates located a distance H from each other. Fluid flow is driven by the bottom plate movi
    15·1 answer
  • Thermosetting polymers are polymers that becomes soft and pliable when heated. ( True , False )
    8·2 answers
  • A seawall with an opening is used to dampen the tidal influence in a coastal area (and limit erosion). The seawall is 2.5 m long
    11·1 answer
  • A car is traveling at 50 ft/s when the driver notices a stop sign 100 ft ahead and steps on the brake. Assuming that the deceler
    6·1 answer
  • ‘Politics and planning are increasingly gaining prominence in contemporary urban and regional planning debates’. Using relevant
    9·2 answers
  • Compared with space operations specialists, intelligence officers are which of the following?
    7·1 answer
  • A building permit allows a builder to?
    6·1 answer
  • Why is electricity considered a secondary source of energy
    6·1 answer
  • Engineers please help im not good when it comes to drawing​
    8·1 answer
  • During welding in the vertical position, the torch angle can be varied to control sagging.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!