Question 3 The Fast Freight Shipping Company charges the following rates: Weight of Package (in kilograms) Rate per 500 Miles Shipped $3.10 2 kg or less Over 2 kg but not more than 6 kg Over 6 kg but not more than 10 kg $4.20 $5.30 over 10 kg $6.40 Write a program that asks for the weight of a package and the distance it is to be shipped. This information should be passed to a calculateCharge function that computes and returns the shipping charge to be displayed. The main function should loop to handle multiple packages until a weight of 0 is entered.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.1: Function And Parameter Declarations
Problem 4E: (Statics) A beam’s second moment of inertia, also known as its area moment of inertia, is used to...
icon
Related questions
Question

this is a C++ question, and the answer has to be in one statement (in C++ code)

Question 3
The Fast Freight Shipping Company charges the following rates:
Weight of Package (in kilograms)
Rate per 500 Miles Shipped
2 kg or less
Over 2 kg but not more than 6 kg
Over 6 kg but not more than 10 kg
$3.10
$4.20
$5.30
over 10 kg
$6.40
Write a program that asks for the weight of a package and the distance it is to be shipped.
This information should be passed to a calculateCharge function that computes and
returns the shipping charge to be displayed. The main function should loop to handle
multiple packages until a weight of 0 is entered.
Transcribed Image Text:Question 3 The Fast Freight Shipping Company charges the following rates: Weight of Package (in kilograms) Rate per 500 Miles Shipped 2 kg or less Over 2 kg but not more than 6 kg Over 6 kg but not more than 10 kg $3.10 $4.20 $5.30 over 10 kg $6.40 Write a program that asks for the weight of a package and the distance it is to be shipped. This information should be passed to a calculateCharge function that computes and returns the shipping charge to be displayed. The main function should loop to handle multiple packages until a weight of 0 is entered.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr