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
Some students are studying the amount of pollution in a river They are using a computer to measure the pollution level using sen
Tpy6a [65]

Answer:

optical sensors

Explanation:

optical sensors measure the amount of gases like carbon dioxide and carbon monoxide in the air

4 0
3 years ago
Please Help Fast!!!!!! Brainliest for First to answer!!! Constructive criticism deals with a person, not his or her behavior.
Stolb23 [73]
I say False. Reasoning because Construction Criticism could be in both ways. Say if someone is doing a project the teacher will give CC to make it better. If a student is acting up (behavioral issues) the teacher can give CC for them to do better. My opinion
5 0
3 years ago
Read 2 more answers
Which of these actions should be performed on a pc prior to using a windows registry edit utility?
Lady_Fox [76]
Back up the Registry onto a hard drive.

Hope this helped, have a great day! :D
7 0
4 years ago
what will be the Trade discount and Invoice Amount if the List Price is $400.00 and the Trade Discount Rate is 85%
V125BC [204]

Answer:

$340

Explanation:

you have to multiply $400 bu 85% to get $340

4 0
3 years ago
Glenda is searching airline schedules on HolApp, a mobile Web application. While browsing the application, a banner appears on t
Artemon [7]

Answer:

online display advertisement

Explanation:

Q:

Glenda is searching airline schedules on HolApp, a mobile Web application. While browsing …

A. online display advertisement

B. contextual advertisement...

A:

A

6 0
2 years ago
Other questions:
  • What should you do if your computer keeps shutting down while working? Make sure your anti-virus software is running and up-to-d
    5·2 answers
  • Methods used to change variables are called ______. equals accessors toString void mutators
    5·1 answer
  • What Are some examples of options you can use for bullets? Check all that apply
    14·1 answer
  • You will be given a value of n and k, one line each. You will write a program that determines the minimum number of probe attemp
    9·1 answer
  • 7.4.1C The global distribution of computing resources raises issues of equity, access, and power. Briefly describe one of these
    11·1 answer
  • Assume the existence of an UNSORTED ARRAY of n characters. You are to trace the CS111Sort algorithm (as described here) to reord
    14·1 answer
  • Example of negative body language include all but
    8·1 answer
  • What are the cons of using keyboard shortcuts?
    12·1 answer
  • Can someone help on number 8? Plz
    14·1 answer
  • I'm doing a VHDL program in Vivado, using a zyboz7 20, which would have 2 teams, each of them with different buttons and led lig
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!