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]
3 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]3 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
What's an array in computer science
muminat

Answer:

An array is a series of memory locations – or 'boxes' – each of which holds a single item of data, but with each box sharing the same name. All data in an array must be of the same data type.

6 0
3 years ago
When a computer is the.................of an attack, it is used as an active tool to conduct the attack
BARSIC [14]

Answer:

Attack is an intentional or unintentional act that causes damage or compromises information of systems supporting it.When a computer is the subject of an attack, it is used as an active tool to conduct the attack.

On the other hand, when a computer is the entity being attacked, it is the object of an attack.

3 0
2 years ago
Most common level of education for a programmer or software developer
shusha [124]

c/c+ also java would be one

8 0
3 years ago
Suppose you run a query, and a dialog box appears asking you to enter a date. You are most likely working with a ________ query.
masya89 [10]

Answer: Parameter

Explanation:

7 0
2 years ago
Graphics you can select to reinforce the goal of your document include ____.
Tanya [424]
The answer would be D all of the above.
8 0
3 years ago
Other questions:
  • Your company has decided to implement a wireless network. The wireless network users must be able to connect to resources on you
    9·1 answer
  • What is the name of the program that takes high-level code and transforms it into machine-level code?
    8·1 answer
  • Which type of network cover a large geographical area and usually consists of several smaller networks, which might use differen
    5·1 answer
  • How can a wiki contribute to an academic paper?
    9·2 answers
  • In cell B12, enter a formula to calculate the amount budgeted for Mileage to/from Airport. The amount is based on the Mileage Ra
    6·1 answer
  • Andy, a developer, is designing a new program. Which tool should Andy use to help him complete his task?
    13·1 answer
  • Write a program that prompts the user to enter the number of integer numbers you need to enter, then ask user to enter these int
    5·1 answer
  • What is the use of technology to enable people to learn anytime and anywhere​
    13·1 answer
  • What tv show inspired the term spam for junk email?
    8·2 answers
  • Which statement best describes the computers all around us?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!