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
Question 2 Unsaved Which of these is NOT an example of an emerging technology? Question 2 options: Sixth Sense Close Range Drone
alexandr1967 [171]

The answer is <em>B.) Close Range Drones</em>

I just took the test

3 0
3 years ago
When you save a Notepad file for the first time, you must also A. print a copy for your records. B. give it a name. C. check the
Kruka [31]
Answer: Give it a name
3 0
3 years ago
What field would you use to store a value from another table?
Levart [38]

Answer:

A. Lookup

Explanation:

You would use the Lookup field to store a value from another table.

7 0
3 years ago
NEED HELP ASAP!
Marrrta [24]
Six inches is the answer
8 0
3 years ago
which application software allows you to compose written ideas on a computer? database, spreadsheet, word processor or graphics
Kazeer [188]
Word processor because it's more for writing
8 0
3 years ago
Other questions:
  • When saving a file, you must provide a valid file name that adheres to specific rules, referred to as _______________.
    5·1 answer
  • You're browsing the Internet and realize your browser is not responding. Which of the following will allow you to immediately ex
    5·2 answers
  • Which of the following documents cannot be created using the Microsoft® Word® application?
    5·2 answers
  • Im being timed please help!!
    7·2 answers
  • Interactive sites where users write personal topics and comments to a threadded discussion are called?
    11·1 answer
  • Most operating systems today primarily use a ____.
    12·1 answer
  • This project is to mimic a meeting request system by checking the requesting party’s validity, and the number of people attendin
    15·1 answer
  • NWhen you measure a person’s weight, you are measuring the
    15·2 answers
  • In a _____, there is no skipping or repeating instructions. A. iteration B. sequence C. selection D. conditional
    10·1 answer
  • A trace table is used for
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!