Tuesday, February 14, 2012
Week 2. Algorithm 5 Step Process
Week 2. Algorithm With Flow Charts
Problem:
-Finding the cost of a Parcel Where Price is x and Weight is y
Inputs:
-Weight
-PostageCost
Output:
-Cost To Post Parcel
Processing:
-Price x Weight (kg)
Algorithm:
Start PostageCost
Prompt user for PkgWeight
Get PkgWeight
Get Price
Verify PkgWeight, Price
PostageCost = PkgWeight * Price
Display PostageCost
End
Problem:
-Find the Estimated number of hours it will take to complete all the levels in a Video Game based on other performance from other games.
Input:
-Hours from games
-No. of Games played
Output:
-Estimated Time To Finish New Game
Processing:
-Hours Divided by No. Of Games
Algorithm:
Start
Prompt user for Hours, #Games
GetHours, #Games
Verify GetHours, #Games
AverageTime = Hours / #Games
Display AverageTime
End
Subscribe to:
Post Comments (Atom)


No comments:
Post a Comment