# C# Question

### Description

## Having Trouble Meeting Your Deadline?

Get your assignment on** C# Question **completed on time. avoid delay and – **ORDER NOW**

Goal: You will apply everything you have learned so far about variables, data types, operators, and selection to write a simple but nonetheless real-world application.

Global Courier Services will ship your package based on how much it weighs and how far you are sending the package. Packages above 50 pounds will not be shipped. You need to write a program in C that calculates the shipping charge.

**The shipping rates are based on per 500 miles shipped. They are not pro-rated, i.e., 600 miles is the same rate as 900 miles or 1000 miles.**

Here are the shipping charges –

**Package Weight Rate per 500 miles shipped**

Less than or equal to 10 pounds $3.00

More than 10 pounds but less than or equal to 50 pounds $5.00

If the shipping distance is more than 1000 miles, there is an additional charge of $10 per package shipped.

Here are some test cases.

**Test Case 1:**

**Input Data:**

- Weight: 1.5 pounds
- Miles: 200 miles (This is one 500 mile segment.)

**Expected results: **

Your shipping charge is $3.00

**Test Case 2:**

**Input Data:**

Weight: 5.6 pounds

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

**Expected results: **

Your shipping charge is $19.00

**Test Case 3:**

**Input Data:**

Weight: 11.0 pounds

Miles: 2000 miles (This is four 500 mile segments.)

**Expected results: **

Your shipping charge is $30.00

**Test Case 4:**

**Input Data:**

Weight: 38 pounds

Miles: 9600 miles (This is twenty 500 mile segments.)

**Expected results: **

Your shipping charge is $110.00

**Test Case 5:**

Weight: 55 pounds

Miles: 345 miles

**Expected results: **

Sorry, we only ship packages of 50 pounds or less.

You need to

Create one more non-trivial (non-zeros) test case. **(4 points)**

Write and debug the code that solves the problem.** (75 points)**

Take screen shots of running the program six different times. Use the five test cases given above and one more test case that you have created. (Total six test cases –**12 points**)

Include programmer name, date and brief problem description at the beginning of the code. **(4 points)**

Include meaningful comments wherever necessary. **(5 points)**

**Hints: This program does not need any loops. It will calculate one shipping charge and stop. **

**Deliverables: Submit only one Word document.**

Copy and paste your code into the Word document.

State your additional test case.

Then use Snipping tool to take the screen shots of the 6 outputs. Put the screenshots on the same word doc (Google it if you do not know how to use it.)

Submit the Word document with solutions to all parts of the assignment by the deadline.

**Email me if you have any questions or if you get stuck.**

**-( In another file doc)**

Lab1-Divide by x

Write a program using integers userNum and x as input, and output userNum divided by x three times.

Ex: If the input is:

`2000 2`

the output is:

`1000 500 250 `

Note: In C, integer division discards fractions. Ex: 6 / 4 is 1 (the 0.5 is discarded).

**Deliverables: Submit only one Word document.**

Copy and paste your code into the Word document.

- State your additional test case.

Then use Snipping tool to take the screen shots of the 6 outputs. Put the screenshots on the same word doc (Google it if you do not know how to use it.)

- Submit the Word document with solutions to all parts of the assignment by the deadline.

-( In another file doc)

- Lab2-Convert to dollars

Given four values representing counts of quarters, dimes, nickels and pennies, output the total amount as dollars and cents.

- Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
`printf("Amount: $%0.2lfn", dollars);`

Ex: If the input is:

`4 3 2 1`

where 4 is the number of quarters, 3 is the number of dimes, 2 is the number of nickels, and 1 is the number of pennies, the output is:

`Amount: $1.41 `

For simplicity, assume input is non-negative.

**Deliverables: Submit only one Word document.**

Copy and paste your code into the Word document.

State your additional test case.

- Then use Snipping tool to take the screen shots of the 6 outputs. Put the screenshots on the same word doc (Google it if you do not know how to use it.)
- Submit the Word document with solutions to all parts of the assignment by the deadline.