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
You place a new disc in an optical drive, and then double-click the drive in the operating system's file browser interface. An e
lidiya [134]

Answer:

Wait. Then you try it again

Explanation:

You wait and try again later and if this still persists, you may have to check the optical drive from the drive manager peradventure there is an issue there probably a software issue, also you may have to clean the optical drive using the cleaner disc, likewise you may need to test an old disc on the optical drive to be sure the fault is not from the disc you inserted.

7 0
3 years ago
Which of these is not considered a final step when creating a Podcast? Getting a loan to help with the cost of the equipment. Ch
Neporo4naja [7]

Answer:

Option 1

Explanation:

Ok first off if your taking out a loan for your podcasting thats a issue. The other options are what you would normally do when setting it up because chances are you have the equipment necessary to start the podcast.

Hope this helps:)

6 0
2 years ago
Create a program to deteate a program to determine whether a user-specified altitude [meters] is in the troposphere, lower strat
nordsb [41]

Answer:

#include <iostream>

using namespace std;

int main()

{

   float altitude;

   cout<<"Enter alttitude in meter";

cin >>altitude;

if(altitude<0 || altitude > 50000)

{

   cout<<"Invalid value entered";

   return 0;

}

else{

   if(altitude<= 10000)

   {cout <<"In troposphere "<<endl;}

   

   else if(altitude>10000 && altitude<=30000)

   {cout <<"In lower stratosphere"<<endl;}

   

   else if(altitude>30000 && altitude<=50000)

   {cout <<"In upper stratosphere"<<endl;}

   

}

   return 0;

}

Explanation:

Define a float type variable. Ask user to enter altitude in meters. Store value to altitude variable.

Now check if value entered is positive and less than 5000,if its not in the range of 0-50,000 display a termination message and exit else check if it's in less than 10000, in between 10000 and 30000 or in between 30000 and 50000.

10,000 is above sea level is troposphere.

10,000-30,000 is lower stratosphere.

30,000-50,000 is upper stratosphere.

3 0
3 years ago
in java how do i Write a method named isEven that accepts an int argument. The method should return true if the argument is even
Veseljchak [2.6K]
<h2>Answer:</h2><h2>============================================</h2>

//Class header definition

public class TestEven {

   

   //Method main to test the method isEven

   public static void main(String args[ ] ) {

       

       //Test the method isEven using numbers 5 and 6 as arguments

       System.out.println(isEven(5));

       System.out.println(isEven(6));

     

   }

   

   //Method isEven

   //Method has a return type of boolean since it returns true or false.

   //Method has an int parameter

   public static boolean isEven(int number){

       //A number is even if its modulus with 2 gives zero

      if (number % 2 == 0){

           return true;

       }

       

       //Otherwise, the number is odd

       return false;

   }

}

====================================================

<h2>Sample Output:</h2>

=========================================================

false

true

==========================================================

<h2>Explanation:</h2>

The above code has been written in Java. It contains comments explaining every part of the code. Please go through the comments in the code.

A sample output has also been provided. You can save the code as TestEven.java and run it on your machine.

3 0
3 years ago
ANSWER ASAP GIVING BRAINIEST FIVE STAR AND HEART!
scoundrel [369]

A formula is statement written by the user to be calculated. Formulas can be as simple or as complex as the user wants. A formula can contain values, references to cells, defined names, and functions.

All formulas must start with the equals sign. =1+2+3

A function is a piece of code designed to calculate specific values and are used inside formulas. Functions to sum values, calculate a trigonometric cosine, and to calculate the current time are built into excel. Additional functions can be defined using Visual Basic.

Functions are typed alongside parenthesizes, where in the arguments if any are listed in between. To use functions in a formula, for example

=COS(3.14) will return the calculated cosine. =NOW() returns the current time. =SUM(1+2+3) *2 will multiply the sum by 2Explanation hope it helps

8 0
3 years ago
Read 2 more answers
Other questions:
  • Given the following code, what is output by the method call, mystery(6 * 8)? public static void mystery (int x[]) { System.out.p
    10·1 answer
  • Which agricultural CTSO has programs for middle-school and high-school students, as well as college students?
    13·2 answers
  • What might be one reason why a stock becomes more valuable over time
    5·1 answer
  • during zach's second visit of the year, he incurred a $450 bill. Describe how much is paid by Zach and the insurance carrier
    7·1 answer
  • While working a night job at a call center, Eric creates an app called EatOut, which can be used to place orders at restaurants,
    14·1 answer
  • What type of Internet monitoring technique records information about a customer during a web surfing session, such as what websi
    8·1 answer
  • Enter a character: * ASCII #42 Enter a character: exit Not a character
    7·1 answer
  • What does it mean to say that data in an Excel table is “dynamically linked” to a chart? What are the advantages of this feature
    5·1 answer
  • Where are all my smart ppl at? Help me out!!!
    14·2 answers
  • Structured query language (sql) enables data analysts to _____ the information in a database.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!