Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started