Sunday, December 14, 2014

Flowchart(รูปแบบการเขียนผังงาน)


Flowchart

1. การทำงานแบบตามลำดับ
รูปแบบการเขียนโปรแกรมที่ง่ายที่สุดคือ เขียนให้ทำงานจากบนลงล่าง เขียนคำสั่งเป็นบรรทัด และทำทีละบรรทัดจากบรรทัดบนสุดลงไปจนถึงบรรทัดล่างสุด สมมติให้มีการทำงาน 3 กระบวนการคือ อ่านข้อมูล คำนวณ และพิมพ์
1. Sequential operation (Sequence)
The programming model is the simplest . Written to run from top to bottom. Write a command line And each line from the top line down to the bottom line . Assuming a 3 -step process to work , read , calculate and print .
 

2. การเลือกกระทำตามเงื่อนไข
การ ตัดสินใจ หรือเลือกเงื่อนไขคือ เขียนโปรแกรมเพื่อนำค่าไปเลือกกระทำ โดยปกติจะมีเหตุการณ์ให้ทำ 2 กระบวนการ คือเงื่อนไขเป็นจริงจะกระทำกระบวนการหนึ่ง และเป็นเท็จจะกระทำอีกกระบวนการหนึ่ง แต่ถ้าซับซ้อน
มากขึ้น จะต้องใช้เงื่อนไขหลายชั้น เช่นการตัดเกรดนักศึกษา เป็นต้น
ตัวอย่างผังงานนี้ จะแสดงผลการเลือกอย่างง่าย เพื่อกระทำกระบวนการ
เพียงกระบวนการเดียว
2. Selection criteria action(Decision)
Decisions or conditions Programming to bring value to your actions . There is usually a two -step process to do the actual conditions of the process is done . And false to act as one process. However, if more complex Will require a multi-layer conditions Such as grading students, etc. Examples of this flowchart . Will display a selection simple . To make the process just a single process

3. การทำซ้ำ
การทำกระบวนการ หนึ่งหลายครั้ง โดยมีเงื่อนไขในการควบคุม หมายถึงการทำซ้ำเป็นหลักการที่ทำความเข้าใจได้ยากกว่า 2 รูปแบบแรก เพราะการเขียนโปรแกรมแต่ละภาษา จะไม่แสดงภาพอย่างชัดเจนเหมือนการเขียนผังงาน ผู้เขียนโปรแกรมต้องจินตนาการด้วยตนเอง
3. Repeat (Iteration or Loop)
Making process , many times The conditions governing The repetition is key to understanding the more difficult because the first two forms of programming languages. May not show as clearly Chemistry. You then have to imagine for