The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
: Start the Flowgorithm program.
Study the Flowgorithm documentation for the If statement.
Create a Flowgorithm program as follows:
Insert a Comment box, and type comment lines for the Author, Date, and Description.
Declare Real variables for weight, ratePerPound and shippingCharge.
Prompt the user for the weight of the package with an Output and Input shape.
Use a series of decisions (If statements) to assign the rate per pound value.
The first selection condition asks if the weight <= 2 pounds. If so (on the True branch), assign the value 1.10 to the variable for the ratePerPound.
Otherwise (on the False branch), the next selection condition asks if the weight is > 2 pounds AND the weight is <= 6 pounds. (You can use the word AND, or a double ampersand &&.) If so, the rate per pound is 2.20, etc.
Complete the series of selections and assignments.
Finally, below the point where all the selection structures close (just above the End shape), multiply the rate per pound by the weight and assign it to the shipping charge. Display the shipping charge by combining text and a variable. Use an output line like this: “The total shipping charge is $” & shippingCharge
Save your file as S04.fprg.
-----------