70 likes | 353 Views
Flow chart Diagram. Flow chart Diagram. A flow chart is a type of diagram that represents an algorithm or process, showing the steps involved in that process. They are used to design computer programs They are three main shape of boxes used as symbols: The terminator
E N D
Flow chart Diagram • A flow chartis a type of diagram that represents an algorithm or process, showing the steps involved in that process. • They are used to design computer programs • They are three main shape of boxes used as symbols: • The terminator • The terminator is used to show where your flow begins or ends. Ideally, you would use words like 'Start', 'Begin', 'End' inside the terminator object to make things more obvious.
Process object • FlowchartProcess object is used to illustrate a process, action or an operation. These are represented by rectangles; and the text in the rectangle mostly includes a verb. • Decision object • Decision object is represented as a Diamond. This object is always used in a process flow to as a question. The answer to the question determines the arrows coming out of the Diamond.
Let’s see some examples: Let’s draw an equilateral triangle yes no Start Let n = 0 FD 1 RT 120 Let n = n + 1 If n < 3 END
2. Let’s draw a flow chart to calculate the first n Fibonacci numbers. Fibonacci num = sum of the previous two num Fibonacci(n) = Fibonacci(n-1) + Fibonacci(n-2) no yes 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ... Start i = 0 j = 1 k = 0 fib = 0 i < n End fib = j + k j = k k = fib i = i + 1