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
Counter argument for why engineers dont make a positive change in the world.​
egoroff_w [7]

Answer:

They don't make a positive change in the world because they have made mistakes that aren't able to be made fixed and there are a lot of engineers who haven't study enough and know the important basis of coming to engineer.

3 0
3 years ago
Bob and Alice are solving practice problems for CSE 2320. They look at this code: for(i = 1; i &lt;= N; i = (i*2)+17 ) for(k = i
MissTica

Answer:

Alice is correct.

The loop are dependent.

Explanation:

for(i = 1; i <= N; i = (i*2)+17 )

for(k = i+1; k <= i+N; k = k+1) // notice i in i+1 and i+N

printf("B")

This is a nested for-loop.

After the first for-loop opening, there is no block of statement to be executed rather a for-loop is called again. And the second for-loop uses the value of i from the first for-loop. The value of N is both called from outside the loop.

So, the second for-loop depend on the first for loop to get the value of i. For clarity purpose, code indentation or use of curly brace is advised.

8 0
3 years ago
Read 2 more answers
Construction support involves mostly what kind of work?
Paraphin [41]

Answer:

Outdoors

Explanation:

Construction workers perform outdoors.

6 0
1 year ago
Compare and contrast the different forms of energy that are represented below:
Kitty [74]

Explanation:

1) Wind energy is generated through a wind turbine. When wind passes through the blades of wind mill, the blades of the wind mill tend to rotate. Due to the spinning of the rotor across the turbine, the kinetic energy from the wind is converted to electrical energy

2) Incase of wind energy, the consumption gets higher when there is more wind and would be zero incase of no movement of blades.

Incase of hydroelectric power, the generation is rather stable and consumption depends on the usage of power from the consumers

Incase of gasoline generator, the generation is also stable subject to availability of gasoline and consumption again depends on the usage of power from the consumers

3) Pros of Hydroelectric power

Cost of electricity generation is less

Can produce green energy

Produce mass volume of electricity

Cons of Hydroelectric power

Requires massive initial investement

Can be installed on certain demographical area

8 0
3 years ago
How do I get my son to do his work?
valentinak56 [21]

Answer:

Explanation:

Reward him if he does his homework/work

If he doesnt do his homework, take things that he loves off of him. and tell him if he does his homework/work he will get them things back

8 0
2 years ago
Other questions:
  • A distillation column is initially designed to separate a mixture of toluene and xylene at around ambient temperature (say, 100°
    13·1 answer
  • A large part in a turbine-generator unit operates near room temperature and is made of ASTM A470-8 steel ( ). A surface crack ha
    11·1 answer
  • Is air conditioner a refrigerator?
    10·1 answer
  • The densities of several materials are given in SI units. Convert these to densities in U.S. customary units (slug/ft3), and als
    12·1 answer
  • When will the entropy value of the universe attained its maximum value?
    13·1 answer
  • Two loads connected in parallel draw a total of 2.4 kW at 0.8 pf lagging from a 120-V rms, 60-Hz line. One load absorbs 1.5 kW a
    5·1 answer
  • Would you rather be fishing or hunting?
    13·2 answers
  • Why do stores still sell those 1.5 volt batteries that are like three times the size of other 1.5 volt batteries. What is the po
    9·2 answers
  • Match the scenario to the problem-solving step it represents.
    7·1 answer
  • How are sedimentary - gravity flows different from fluid - gravity flows
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!