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
Aside from human user types, there are non human user groups. Known as account types, __________ are implemented by the system t
SpyIntel [72]

Answer: B. system accounts, contingent IDs

Explanation:

Aside from human user types, there are non human user groups. Known as account types, (system accounts) are implemented by the system to support automated services, and contingent IDs are accounts that remain non human until individuals are assigned access and can use them to recover a system following a major outage. The system account is refered to as the user account which the operating system creates during installation.

Therefore, the correct option is B.

7 0
2 years ago
In your presentation you added a text box to?
Flura [38]
The correct answer would be to - Cite a source
7 0
3 years ago
Using the mouse to move or copy cells is called ____.
g100num [7]
Using the mouse to move or copy cells is called drag and drop
3 0
3 years ago
Why is an ISA unlikely to change between successive generations of microarchitectures
QveST [7]
Someone answer this because I need to know as well
\
4 0
2 years ago
12.
melisa1 [442]
The correct answer is 1.6
7 0
2 years ago
Other questions:
  • "list at least 3 key performance indicators that should be considered prior to initiating a cloud deployment."
    15·1 answer
  • Terminal resource security is a software feature that erases the screen and signs a user off automatically after a specified len
    14·1 answer
  • What is the function of the capsid? it allows a virus to live independently. it is composed of genetic material. it destroys the
    12·2 answers
  • Conversion of a continuous stream of sound into a series of ones and zeroes that can be interpreted by computers results in
    12·1 answer
  • Consider the following code segment.
    15·1 answer
  • What is the importance of human flourishing to science and technology?​
    8·1 answer
  • What type of network would be suitable for linking all computers in a building
    6·1 answer
  • Which function category is not in Excel 2016?
    12·2 answers
  • Select the correct answer from each drop-down menu. What are the effects of emerging technology? has brought the internet to alm
    10·1 answer
  • What is the purpose of a project overview?
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!