Flowchart (รูปแบบการเขียนผังงาน)
Flowchart
ผังงาน (Flowchart) คือการเขียนอธิบายการทำงานของโปรแกรมในลักษณะสัญลักษณ์ รูปภาพ ซึ่งสามารถเข้าใจได้ง่ายกว่าการอธิบายเป็นข้อความและเห็นลำดับขั้นตอน (Algorithm) การทำงานของโปรแกรมอย่างชัดเจน เมื่อเจอโจทย์ที่ให้แก้ปัญหาที่ซับซ้อนมาก ก็จะทำให้การเขียนอธิบายขั้นตอนการแก้ปัญหายากตามไปด้วย แต่การเขียนอธิบายด้วยผังงานทำให้การอธิบายง่ายขึ้นและมีความเป็นมาตรฐานมีการใช้งานทั่วไป
Flowchart (noun) - A visual representation of the sequence of steps and decisions needed to perform a process.Each step in the sequence is noted within a diagram shape. Steps are linked by connecting lines and directional arrows. This allows anyone to view the flowchart and logically follow the process from beginning to end.
1) การทำงานแบบเป็นลำดับ (Sequence)
รูปแบบการเขียนโปรแกรมที่ง่ายที่สุดคือ เขียนให้ทำงานจากบนลงล่าง เขียนคำสั่งเป็นบรรทัด และทำทีละบรรทัดจากบรรทัดบนสุดลงไปจนถึงบรรทัดล่างสุด สมมติให้มีการทำงาน 3 กระบวนการคือ อ่านข้อมูล คำนวณ และพิมพ์
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) การทำงานแบบเลือกทำ (Selection)
การตัดสินใจ หรือเลือกเงื่อนไขคือ เขียนโปรแกรมเพื่อนำค่าไปเลือกกระทำ โดยปกติจะมีเหตุการณ์ให้ทำ 2 กระบวนการ คือเงื่อนไขเป็นจริงจะกระทำกระบวนการหนึ่ง และเป็นเท็จจะกระทำอีกกระบวนการหนึ่ง แต่ถ้าซับซ้อนมากขึ้น จะต้องใช้เงื่อนไขหลายชั้น เช่นการตัดเกรดนักศึกษา เป็นต้น ตัวอย่างผังงานนี้ จะแสดงผลการเลือกอย่างง่าย เพื่อกระทำกระบวนการเพียงกระบวนการเดียว
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) การทำงานวนรอบ (Repetition)
การทำกระบวนการหนึ่งหลายครั้ง โดยมีเงื่อนไขในการควบคุม หมายถึงการทำซ้ำเป็นหลักการที่ทำความเข้าใจได้ยากกว่า 2 รูปแบบแรก เพราะการเขียนโปรแกรมแต่ละภาษา จะไม่แสดงภาพอย่างชัดเจนเหมือนการเขียนผังงาน ผู้เขียนโปรแกรมต้องจินตนาการด้วยตนเอง
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 themselves.