Create Program Plan, Algorithm, and Flowchart
A company classifies its products by weights as follows:
Class A – 12 pound or over
Class B – 5 to 11.9 pounds
Class C – less than 5 pounds
Show the logic of determining into which class to place an item.
Program Plan:
1. Declare variables
2. Read weights
3. Create if statement
4. Display result
Algorithm:
Start
Declare variable weights
Read weights
if weights>=12 then
Display message: "Class A"
End if
if weights>=5 and weights<= 11.9 then
Display message: "Class B"
End if
if weights<5 then
Display message: "Class C"
End if
Stop
Flowchart
Comments
Leave a comment