9 Programming Structiure V

9 Programming Structiure V - Problem Solving Procedures...

This preview shows pages 1–5. Sign up to view the full content.

Problem Solving Procedures Flowchart A graphical representation of an algorithm (c.f. pseudocode that's verbal in nature) Beginning / End of Algorithm Process / Assignment Selection Input / Output Flow Flowchart Symbols Explanation Example Start Input TestScore Input ExamScore FinalScore = TestScore x 0.3 + ExamScore x 0.7 FinalScore >=40 Status = "Fail" Status = "Pass" Output Status End False True There must be : - one single Beginning point and - one single End point

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Problem Solving Procedures The following flowchart contains a loop. Study it and explain what it does. Start input n i<= n Output i*i End False True i = i+1 Flowchart Exercise 1: i = 1
Problem Solving Procedures Flowchart Exercise 2: Revise the previous flowchart so that it checks whether the user inputs a valid value (1- 100), and repeat the input until it is valid. Start input n i<= n Output i*i End False True i = i+1 i = 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Problem Solving Concepts 4. PROGRAM DEVELOPMENT After designing the algorithm, we realize the algorithm by practical means – programming. In program development, lower level refinements (pseudo-codes, detailed structure diagrams, flowcharts) may be changed or added along. Top down approach:
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 9

9 Programming Structiure V - Problem Solving Procedures...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online