1. Using the five step process, develop an algorithm for the following problem:
You
need to know the cost of sending a parcel to someone. The price of
sending the item will depend upon its weight. The postal service has a
standard charge per kilo of item weight.
Inputs:
postal service kilo charge.
parcel weight.
Processing:
Multiply postal service kilo charge by parcel weight
Outputs:
TotalCost
Start CalculateTotalCost
1.Prompt user for the postal service kilo charge
2. Get postal service kilo charge
1.Prompt user for the postal service kilo charge
2. Get postal service kilo charge
3.Prompt user for postal service kilo charge
4. Get postal service kilo charge
4. Get postal service kilo charge
5. TotalCost = postal service kilo charge x parcel weight
6. Display TotalCost
End
End
No comments:
Post a Comment