1 / 14

Flow Chart

Flow Chart. Flow Chart. A flow chart is a graphical or symbolic representation of a process . Each step in the process is represented by a different symbol and contains a short description of the process step .

aimon
Download Presentation

Flow Chart

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Flow Chart

  2. Flow Chart • A flow chart is a graphical or symbolic representation of a process. • Each step in the process is represented by a different symbol and contains a short description of the process step. • The flow chart symbols are linked together with arrows showing the process flow direction.

  3. Flow Chart • This diagrammatic representation can give a step-by-step solution to a given problem. • Data is represented in the boxes, and arrows connecting them represent flow / direction of flow of data. • Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields

  4. Flow Chart • shows logic of an algorithm • emphasizes individual steps and their interconnections • e.g. control flow from one action to the next

  5. Flow Chart

  6. START Input M1,M2,M3,M4 GRADE(M1+M2+M3+M4)/4 IS GRADE<50 N Y PRINT “FAIL” STOP Flow Chart • Example Step 1: Input M1,M2,M3,M4 Step 2: GRADE  (M1+M2+M3+M4)/4 Step 3: if (GRADE <50) then Print “FAIL” else Print “PASS” endif PRINT “PASS”

  7. Flow Chart Write an algorithm and draw a flowchart that will read the two sides of a rectangle and calculate its area. Pseudocode • Input the width (W) and Length (L) of a rectangle • Calculate the area (A) by multiplying L with W • Print A

  8. START Input W, L A  L x W Print A STOP Flow Chart Algorithm • Step 1: Input W,L • Step 2: A  L x W • Step 3: Print A

  9. Flow Chart • Write an algorithm that reads two values, determines the largest value and prints the largest value with an identifying message. ALGORITHM Step 1: Input VALUE1, VALUE2 Step 2: if (VALUE1 > VALUE2) then MAX  VALUE1 else MAX  VALUE2 endif Step 3: Print “The largest value is”, MAX

  10. START Input VALUE1,VALUE2 Y N is VALUE1>VALUE2 MAX  VALUE1 MAX  VALUE2 Print “The largest value is”, MAX STOP Flow Chart

  11. Flow Chart • Example 11: Write down an algorithm and draw a flowchart to find and print the largest of N (N can be any number) numbers. Read numbers one by one. Verify your result by a trace table. (Assume N to be 5 and the following set to be the numbers {1 4 2 6 8 })

  12. Flow Chart • Step 1: Input N • Step 2: Input Current • Step 3: Max  Current • Step 4: Counter 1 • Step 5: While (Counter < N) Repeat steps 5 through 8 • Step 6: Counter  Counter + 1 • Step 7: Input Next • Step 8: If (Next > Max) then Max  Next endif • Step 9: Print Max

  13. START Input N, Current Max  Current Counter 1 Counter < N N Y Print Max Counter  Counter +1 Input Next STOP Next >Max N Y Max  Next Flow Chart

  14. Flow Chart

More Related