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
Vadim26 [7]
2 years ago
12

The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound. 1. Declare a const named CENTS_PER_POUND and initi

alize with 25. 2. Get the shipping weight from user input storing the weight into shipWeightPounds. 3. Using FLAT_FEE_CENTS and CENTS_PER_POUND constants, assign shipCostCents with the cost of shipping a package weighing shipWeightPounds.
#include
using namespace std;

int main() {
int shipWeightPounds;
int shipCostCents = 0;
const int FLAT_FEE_CENTS = 75;

/* Your solution goes here */

cout << "Weight(lb): " << shipWeightPounds;
cout << ", Flat fee(cents): " << FLAT_FEE_CENTS;
cout << ", Cents per lb: " << CENTS_PER_POUND;
cout << ", Shipping cost(cents): " << shipCostCents << endl;

return 0;
}
Computers and Technology
1 answer:
viva [34]2 years ago
4 0

Answer:

Replace /* Your solution goes here */

with

<em>const int CENTS_PER_POUND = 25; </em>

<em> cout << "Weight(lb): "; </em>

<em>cin >> shipWeightPounds; </em>

<em>shipCostCents = FLAT_FEE_CENTS + CENTS_PER_POUND * shipWeightPounds; </em>

<em />

Explanation:

This line declares and initializes CENTS_PER_POUND as constant integer to 25

const int CENTS_PER_POUND = 25;

This line prompts user for weight of shipment

cout << "Weight(lb): ";

This line gets weight from the user

cin >> shipWeightPounds;

This line calculates the cost of shipment

shipCostCents = FLAT_FEE_CENTS + CENTS_PER_POUND * shipWeightPounds;

You might be interested in
Read the following scenario what type of business letter do you think is required in this situation?
grandymaker [24]

Answer:

Cover letter

Explanation:

The type of business letter Melissa and Melrose would need to write is a Cover letter.

The Cover Letter is usually not more than a page document which gives a kind of summary or hint about who individual is and the quality of the individual, while highlighting why an individual is the best fit for the role they are seeking for.

Most recruiters usually make use of the cover letter, as a first hurdle, to screen out applicants especially when applications are much.

Melissa and Melrose, in addition to the resume they would submit for the volunteering job, would need a cover letter.

8 0
2 years ago
Read 2 more answers
Consumers who wish to make a purchase from other consumer on ebay need tl
il63 [147K]

Answer:

Bid on item

Explanation:

Consumers who wish to make a purchase from other consumer on ebay need to first of all bid on the item. This is done by specifying the price in which the purchase should be made.

When this is done, the seller contacts the buyer if he/she’s okay with the price of the goods and services and other formalities are discussed.

8 0
2 years ago
Choose the missing method name.
leva [86]

Answer:

midpoint i'm pretty sure. :)

Explanation:

3 0
2 years ago
Write a program that asks the user to input their first and last names. The first prompt should state:
VikaD [51]

first = input("Please input your first name: ")

last = input("Please input your last name: ")

print(last+", "+first)

I hope this helps!

8 0
2 years ago
Samantha is looking for a lens that is lightweight and small, making it easy to transport. She doesn’t care about the lens being
irina1246 [14]

Answer:

The correct option is;

d. Prime

Explanation:

A prime lens is a unifocal, or fixed-focal-length lens and it is referred to as the opposite of a zoom lens

The maximum aperture of ranges from f2.8 to f1.2, which are fast and have a creamy rendering of light that are out of focus, and also provide crispy image details, by making the most use of the light available and provide distinct combination of foreground and background images in pictures that give a crisp and visually pleasing appearance.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Write a void function SelectionSortDescendTrace() that takes an integer array, and sorts the array into descending order. The fu
    9·1 answer
  • Which statements describe the advantages of using XML?
    12·2 answers
  • You are part of the team to implement new software at XYZ Inc. The employees at XYZ Inc. trust the results of the old software p
    15·1 answer
  • In the Programming Process which of the following is not involved in defining what the program is to do:_____________ Group of a
    10·1 answer
  • Question 2 of 10
    12·1 answer
  • When you purchase donuts, they come in boxes of 12, so 24 donuts take 2 boxes. All donuts need to be in a box, so if you buy 13
    10·1 answer
  • Why are formulas used in spreadsheets?
    10·1 answer
  • Zybook C++ 3.21 answer
    9·1 answer
  • What does the following loop do? val = 0 total = 0 while (val &lt; 10): val = val + 1 total = total + val print(total)
    15·1 answer
  • Notes on secondary memory​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!