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

The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound.

Computers and Technology
1 answer:
Sonbull [250]2 years ago
6 0

Answer:

The following alterations are done to the program

1. Replace <em>/* Your solution goes here */ </em>with

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

<em>cout<<"Ship Weight Pounds: "; </em>

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

<em />

2. Include

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

after

<em>cout << ", Cents per lb: " << CENTS_PER_POUND;</em>

Explanation:

<em>See attachment for complete program as it should be ordered</em>

<em></em>

This line declares CENTS_PER_POUND as a constant integer and it also initializes the variable to 25

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

This prompts the user for the weight of the shipping items (in pounds)

<em>cout<<"Ship Weight Pounds: "; </em>

<em />

This gets user input for  the weight of the shipping item

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

<em />

<em>.............................</em>

<em>........</em>

<em>...</em>

This calculates the cost of shipping the item

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

Download cpp
You might be interested in
Complete the following Programming Assignment using Recursion. Use good programming style and all the concepts previously covere
Likurg_2 [28]

Answer:

Explanation:

public class Ackermann {

   public static int ackermann's(int m, int n) {

       if (m == 0) {

           return n + 1;

       } else if (n == 0) {

           return ackermann's(m-1, 1);

       } else {

           return ackermann(m - 1, ackermann(m, n - 1));

       }

   }

   public static void main(String[] args) {

       System.out.println(ackermann(0, 0));

       System.out.println(ackermann(0, 1));

       System.out.println(ackermann(1, 1));

       System.out.println(ackermann(1, 2));

       System.out.println(ackermann(1, 3));

       System.out.println(ackermann(2, 2));

       System.out.println(ackermann(3, 2));

   }

}

1

2

3

4

5

6

7

29

Process finished with exit code 0

6 0
3 years ago
What task can a user accomplish by customizing theme colors?
Stolb23 [73]

Answer:

D

Explanation:

I took the test

3 0
3 years ago
Read 2 more answers
Type the correct answer in the box. Spell the word correctly.
fomenos

Answer:

"a callout is a type of text box that also includes a line for pointing to any location on the document. A callout appears under the SHAPES menu of the word processing program. The answer that completes this statement is the word "shapes". Hope this answers your question."

Explanation:

8 0
3 years ago
Read 2 more answers
Nila has created a report, and now she would like to a create table of contents. Nila has reviewed her report and decides to add
Alenkinab [10]

Answer:

The answer is "heading"

Explanation:

Headings, which appear into your document must be marked simply, objectively and correctly because it shows the final report structure and enable to easy access with specific information.  

  • It also promotes to read the document. So, its consistency is ensured in the headings.
  • In sort documents, it can't require any heading, but it Nila created a report, in which she requires  heading and then she update the content of the tables, and other choices can't be described in the given scenario, that's why it is correct
5 0
3 years ago
A computer hard disk starts from rest, then speeds up with an angular acceleration of 190 rad/s2 until it reaches its final angu
Nataly_w [17]
The first thing we are going to do is find the equation of motion:
 ωf = ωi + αt
 θ = ωi*t + 1/2αt^2
 Where:
 ωf = final angular velocity
 ωi = initial angular velocity
 α = Angular acceleration
 θ = Revolutions.
 t = time.
 We have then:
 ωf = (7200) * ((2 * pi) / 60) = 753.60 rad / s
 ωi = 0
 α = 190 rad / s2
 Clearing t:
 753.60 = 0 + 190*t
 t = 753.60 / 190
 t = 3.97 s
 Then, replacing the time:
 θ1 = 0 + (1/2) * (190) * (3.97) ^ 2
 θ1 = 1494.51 rad
 For (10-3.97) s:
 θ2 = ωf * t
 θ2 = (753.60 rad / s) * (10-3.97) s
 θ2 = 4544,208 rad
 Number of final revolutions:
 θ1 + θ2 = (1494.51 rad + 4544.208 rad) * (180 / π)
 θ1 + θ2 = 961.57 rev
 Answer:
 the disk has made 961.57 rev 10.0 s after it starts up
3 0
2 years ago
Read 2 more answers
Other questions:
  • The ____ operation is used to add an element onto the stack.
    15·1 answer
  • Give two examples of desktop publishing software
    7·1 answer
  • What is a block cipher algorithm that operates on 64-bit blocks and can have a key length from 32 to 448 bits?
    8·1 answer
  • Which of the following statements is true of intrapreneurs
    15·1 answer
  • Audio editing software contains several codecs that allow you to
    15·1 answer
  • Which form of investigation aims at checking whether or not a target system is subject to attack based on a database of tests, s
    15·1 answer
  • Claire is trying to listen to her history professor's lecture, but her mind keeps wandering to thoughts about her plans for the
    5·1 answer
  • Kellyn needs to move Slide 8 of his presentation up so that it becomes Slide 6. What best describes how he can do this using the
    11·2 answers
  • How to create create a database in mysql using clv files
    11·1 answer
  • P.W. Singer jokes about how many people are using Wang computers. What point is he making with this joke?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!