Question: ACTIVITY 2 . 9 . 1 : Using constants in expressions. Full screen 5 6 8 8 1 4 . 4 2 6 7 4
ACTIVITY
: Using constants in expressions.
Full screen
The cost to ship a package is a flat fee of cents plus cents per pound. Organize the correct code statements to:
Declare a constant integer variable named CENTSPERPOUND and initialize the constant with the value
Read the shipping weight from input and store the weight into shipWeightPounds.
Using the constants FLATFEECENTS and CENTSPERPOUND, assign shipCostCents with the cost of shipping a package weighing shipWeightPounds.
Ex: If the input is then the output is:
Weightlb: Flat feecents: Cents per lb:
Shipping costcents:
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...
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
