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]
2 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]2 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
The average number of entities completed per unit time -- the output rate -- from a process is called ____.
Sergio039 [100]

Answer:

Throughput.

Explanation:

The average number of entities completed per unit time -- the output rate -- from a process is called throughput.

Basically, throughput is a technical term used to describe the amount of data that can be transmitted or transferred from one place to another in a specific period of time. It is used to measure or determine the performance of RAM and hard drives.

8 0
2 years ago
Any please answer this How much resistance is required to gen-erate 50 mA of current from a 5 volt bat-tery?
nasty-shy [4]

Answer:

Calculating Currents: Current in a Truck Battery and a Handheld Calculator ... (b) How long does it take 1.00 C of charge to flow through a handheld calculator if a 0.300-mA current is ...

7 0
2 years ago
JAVA
Umnica [9.8K]

import java.util.Scanner;

public class JavaApplication58 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter a positive integer:");

       String num = scan.nextLine();

       for (int i = num.length()-1; i >=0; i--){

           System.out.println(num.charAt(i));

       }

       

   }

   

}

I hope this helps!

5 0
3 years ago
Queries are questions true or false?
makkiz [27]
True

…………………………………………………..
5 0
3 years ago
What is the value of y when this code executes?
Cerrena [4.2K]

Answer:

The operation of 6*x only executes if x is greater or equal to 0, since x=-10 and -10 is less than 0, the operation does not execute. For this reason,  the value of y using this code is None.

Explanation:

In python a function is defined with the syntaxis:  

def function(x):  

the operation to execute (x)

value to return

In this case, the function is foo and the parameter is x:  

def foo(x):

  if x>= 0:

     return 6*x

The code starts by assigning a value to x. Then, the code asks if the value of x is grater or equal to 0, if this condition is meet, then the code returns the value of 6 times x, if not, then the code does not return a value. In this case, x is -10 and this value is not grater or equal to 0. Given that the condition is not met, then the code stops executing and the value of y is none.

4 0
3 years ago
Other questions:
  • A pacing calendar is provided to students so they can:
    8·2 answers
  • considering that two variables counters and accumulators are important in loop design. What would be their purpose?
    9·1 answer
  • You would like to know how many cells contain data. Which function should you use? COUNT MIN SUM ABS
    14·1 answer
  • for what reason do some security professionals consider insiders more dangerous than outside intruders?
    8·1 answer
  • If a 120 V appliance requires 15 A to operate, what is the resistance of the appliance?
    10·1 answer
  • What term is used to refer to the way companies collect and process data in order to create new information to make important bu
    13·1 answer
  • Once secured a wheelchair may move up to 6 inches in any direction
    6·1 answer
  • Which of the following countries have mixed-market economy
    5·1 answer
  • -(-13) P binary using signed. 2's complement representation
    11·1 answer
  • which is a correct procedural step for a webpage to render on a user's browser? an information request is sent to an ip address
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!