Monday 5 August 2013

Send a parcel algorithm

Task 1
1.  The problem is that we need to find the price of sending a parcel.
2.  The inputs are the weight of the parcel and the price per kiloram.
3.  The output is the final cost of sending the parcel.
4.
i) Get the items weight
ii) Get the standard charge per kilo
iii) Calculate the price of sending the item
iv) Display the price of sending the item
5.  Pseudocode
Calculate price of sending parcel

Prompt user for ItemWeight, CostPerKilo
Get ItemWeight, CostPerKilo
CostofSendingParcel = ItemWeight*CostPerKilo
Display CostofSendingParcel

Task 2
The steps ti creating an algorithm are:
Step 1: Define the problem
Step 2: Define the inputs
Step 3: Define the outputs
Step 4: Define processing
Step 5: Write the pseudocode

No comments:

Post a Comment