Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using visual studio , write a c program for Shipping Calculator: Speedy Shipping Company will ship your package based on how much it weighs and

using visual studio , write a c program for Shipping Calculator: Speedy Shipping Company will ship your package based on how much it weighs and how far you are sending the package. They will only ship small packages up to 10 pounds. You need to have a program that will help you determine how much they will charge.

The charges are based on each 500 miles shipped. They are not pro-rated, i.e., 600 miles is the same charge as 900 miles, i.e., 600 miles is counted as 2 segments of 500 miles.

Here is the table they gave you:

Package Weight Rate per 500 miles shipped

2 pounds or less $1.50

More than 2 but not more than 6 $3.70

More than 6 but not more than 10 $5.25

Test Case 1:

Input Data:

Weight: 1.5 pounds

Miles: 200 miles (This is one 500 mile segment.)

Expected results:

Your shipping charge is $1.50

Test Case 2:

Input Data:

Weight: 5.6 pounds

Miles: 1200 miles (This is three 500 mile segments.)

Expected results:

Your shipping charge is $11.10

=================================

Hints: This program does not need any loops. We are only up to video segment 7. The program will calculate one shipping charge and stop. Your test cases should test the various possibilities, and the limits of the program.

Big Helpful Hint: You can use integer division, for example: 1200 / 500 = 2

start with

#include

#include

use printf , scanf_s

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions

Question

What is the environment we are trying to create?

Answered: 1 week ago

Question

4. What actions should Bouleau & Huntley take now?

Answered: 1 week ago