Upcoming SlideShare
×

# Basic Flowcharting

• 12,022 views

Goes through basic flowcharting symbol and their use in selection and repetition programming structures.

Goes through basic flowcharting symbol and their use in selection and repetition programming structures.

More in: Technology , Education
• Comment goes here.
Are you sure you want to
• really simple!
Are you sure you want to

Total Views
12,022
On Slideshare
0
From Embeds
0
Number of Embeds
1

Shares
474
1
Likes
5

No embeds

### Report content

No notes for slide

### Transcript

• 1. Flowchart Algorithm Description
• 2. Always begin with a BEGIN: There should be one begin and one end in each program: one way in, one way out. Subprograms have their own begin and end. Terminals (begin and end) should be horizontally central on the page. Don't forget to draw a line from the centre of the terminal. Begin
• 3. You probably need to communicate with the user. Give the user instructions and accept input from the user with this symbol. Don't forget the line! Input / Output: Begin Input / Output
• 4. Process: You can set the value of a variable or perform a calculation in a process. Begin Input / Output Process
• 5. Example: a basic conversion algorithm The input / output symbol is used to show the user the results of the calculation. REMEMBER: one BEGIN and one END. You now have enough symbols to accept input, perform a calculation on it and display the result. Begin Cm = inches * 2.54 Get Inches Display cm End
• 6. What about user choice? A diamond shape is used to show decisions... ?
• 7. Selection allows the program to run different paths depending on a condition. The condition (question) resolves to TRUE or FALSE. True False Using Selection: Begin Display menu: 1. Inches to cm 2. cm to inches Get choice Choice = 1 End Convert cm Convert Inches
• 8. Multi-way Selection: CASE statements allow different paths depending on the value of a testing variable.
• 9. What about repetition? Repetition also involves a decision. To continue or not to continue... ?
• 10. Guarded loops: If the condition is true, the loop executes. True False Note: the up line has an arrow! ?
• 11. Unguarded loops: Note: the up line has an arrow! The loop executes until the condition is true. True False ?
• 12. The End