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]
3 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]3 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
There is no reason to study the works of famous photographers because they will make you less creative.
weeeeeb [17]
I think it is true because you may be ‘inspired’ by a famous artist but if you’re always being inspired by others its not 100% yours / you being creative
8 0
3 years ago
Read 2 more answers
the list of available fonts in the fonts gallery may differ, depending on what fonts you have installed and the type of printer
aalyn [17]
I believe the correct answer is true. The <span>list of available fonts in the fonts gallery may differ, depending on what fonts you have installed and the type of printer you are using. Not all fonts would be available in all computers and for all printers. It should be installed first before use.</span>
5 0
3 years ago
JAVA
butalik [34]

Answer:

import java.util.*;

public class MyClass {

   public static void main(String args[]) {

       Scanner input = new Scanner(System.in);

       System.out.print("Input a word: ");

       String userinput = input.nextLine();

       for(int i =0;i<userinput.length();i+=2) {

           System.out.print(userinput.charAt(i));

       }

   }

}

Explanation:

This line prompts user for input

       System.out.print("Input a word: ");

This declares a string variable named userinput and also gets input from the user

       String userinput = input.nextLine();

The following iterates through every other character of userinput from the first using iteration variable i and i is incremented by 2

       for(int i =0;i<userinput.length();i+=2) {

This prints characters at i-th position

           System.out.print(userinput.charAt(i));

5 0
2 years ago
Which of the following translates packets so that the node can understand them once they enter through a port?
podryga [215]
Hi
D)A NICHappy to assist you!
8 0
3 years ago
Read 2 more answers
What internal commands can we use when in interactive mode? can we use CLS and CD?
krok68 [10]
The cd command, also known as chdir (change directory), is a command-line shell command used to change the current working directory in various operating systems. It can be used in shell scripts and batch files.
3 0
2 years ago
Other questions:
  • Which of the following is the rarest and most valuable mineral ore among the native elements?
    13·1 answer
  • To download a webpage, the web browser copies files and transfer them to your ____
    14·2 answers
  • Suppose a retailer who has no technology expertise wishes to set up an online presence for his business. He ________. a. ​can us
    6·1 answer
  • In which job role would a course in 3D modeling help with professional career prospects?
    9·2 answers
  • I stole you pokemon cards :o
    6·2 answers
  • The MAA is responsible on a daily basis to protect office computers and patient records and personal information from hackers. R
    12·1 answer
  • Why are control components necessary in traditional software and generally not required in object-oriented software?​
    11·1 answer
  • Discuss how a lack of infrastructure in poor communities could contribute to ill-health such as the Unrest looting.​
    9·1 answer
  • What feature preserves your open apps and data, but allows another user to log in to his or her own session of the same computer
    7·1 answer
  • In the context of machine learning, an artificial neural network (ann) is most likely used for?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!