Question: ACTIVITY 2 . 9 . 1 : Using constants in expressions. Full screen 5 6 8 8 1 4 . 4 2 6 7 4

ACTIVITY
2.9.1: Using constants in expressions.
Full screen
568814.4267496.q3zqy7
The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound. Organize the correct code statements to:
Declare a constant integer variable named CENTS_PER_POUND and initialize the constant with the value 25.
Read the shipping weight from input and store the weight into shipWeightPounds.
Using the constants FLAT_FEE_CENTS and CENTS_PER_POUND, assign shipCostCents with the cost of shipping a package weighing shipWeightPounds.
Ex: If the input is 10, then the output is:
Weight(lb): 10, Flat fee(cents): 75, Cents per lb: 25
Shipping cost(cents): 325
Note: This activity includes distractors. Not all code statements on the left will be used in the final solution.
How to use this tool
Unusedmain.cppLoad default template...
 ACTIVITY 2.9.1: Using constants in expressions. Full screen 568814.4267496.q3zqy7 The cost

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!