9 Programming Structiure V

9 Programming Structiure V - Problem Solving Procedures...

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

View Full Document Right Arrow Icon
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
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
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
Background image of page 3

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

View Full DocumentRight Arrow Icon
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:
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

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 Right Arrow Icon
Ask a homework question - tutors are online