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
Consider a Carnot heat pump cycle executed in a steady-flow system in the saturated mixture region using R-134a flowing at a rat
attashe74 [19]

Answer:

7.15

Explanation:

Firstly, the COP of such heat pump must be measured that is,

              COP_{HP}=\frac{T_H}{T_H-T_L}

Therefore, the temperature relationship, T_H=1.15\;T_L

Then, we should apply the values in the COP.

                           =\frac{1.15\;T_L}{1.15-1}

                           =7.67

The number of heat rejected by the heat pump must then be calculated.

                   Q_H=COP_{HP}\times W_{nst}

                          =7.67\times5=38.35

We must then calculate the refrigerant mass flow rate.

                   m=0.264\;kg/s

                   q_H=\frac{Q_H}{m}

                         =\frac{38.35}{0.264}=145.27

The h_g value is 145.27 and therefore the hot reservoir temperature is 64° C.

The pressure at 64 ° C is thus 1849.36 kPa by interpolation.

And, the lowest reservoir temperature must be calculated.

                   T_L=\frac{T_H}{1.15}

                        =\frac{64+273}{1.15}=293.04

                        =19.89\°C

the lowest reservoir temperature = 258.703  kpa                    

So, the pressure ratio should be = 7.15

8 0
2 years ago
For welding the most important reason to use jigs and fixtures in a welding shop is to
diamong [38]

Answer:

Reduce manufacturing costs.

Explanation:

Hope This Helps

Have A Great Day

7 0
2 years ago
How many 10" diameter circles can be cut from a semicircular shape that has a 20"
N76 [4]

9514 1404 393

Answer:

  1

Explanation:

Only one such circle can be drawn. The diameter of the 10" circle will be a radius of the semicircle. In order for the 10" circle to be wholly contained, the flat side of the semicircle must be tangent to the 10" circle. There is only one position in the figure where that can happen. (see attached).

3 0
2 years ago
Read 2 more answers
A) Total Resistance<br> b) Total Current<br> c) Current and Voltage through each resistor
Varvara68 [4.7K]
C my friend 20 characters suck
3 0
2 years ago
Please look at the picture for question.
Vilka [71]

Answer:

more than 10 joules jjsjdnjdfjnfjfnjfnnfndnndjnfjgngjntjfjmrmdkdmjd

5 0
1 year ago
Read 2 more answers
Other questions:
  • How fast is a 2012 nissan sentra<br>speed and acceleration ​
    15·1 answer
  • How is TEL (total equivalent length) measured and calculated? .​
    12·1 answer
  • A logic chip used in a computer dissipates 3 W of power in an environment at 120°F, and has a heat transfer surface area of 0.08
    11·1 answer
  • Reusable refrigerant containers under high-pressure must be hydrostatically tested how often?
    10·1 answer
  • Water vapor at 10bar, 360°C enters a turbine operatingat steady state with a volumetric flow rate of 0.8m3/s and expandsadiabati
    11·1 answer
  • A piston–cylinder device containing carbon dioxide gas undergoes an isobaric process from 15 psia and 80°F to 170°F. Determine t
    15·1 answer
  • Most of the work that engineers do with fluids occurs in nature. True False
    6·1 answer
  • Which of the following can effect LRO?
    12·1 answer
  • What are the laws that apply to one vehicle towing another?
    11·1 answer
  • A rigid vessel with a volume of 10 m3 contains a water-vapor mixture at 400 kPa. If the quality is 60 percent, find the mass. Th
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!