Presentation is loading. Please wait.

Presentation is loading. Please wait.

Flowchart Tutorial.

Similar presentations


Presentation on theme: "Flowchart Tutorial."— Presentation transcript:

1 Flowchart Tutorial

2 Start or end of the program
Computational steps or processing function of a program Input or output operation Decision making and branching Connector or joining of two parts of program

3 Draw a flowchart to find the sum of first 50 natural numbers.
Example 1: Draw a flowchart to find the sum of first 50 natural numbers.

4 start SUM=0 N=0 N=N+1 SUM=SUM+N no IS N==50? yes Print SUM END

5 Draw a flowchart to find the largest of three numbers A, B, and C.
Example 2 Draw a flowchart to find the largest of three numbers A, B, and C.

6 START READ A,B,C yes IS B >C ? no IS A>B ? yes IS A>C ? yes no no PRINT C PRINT A PRINT B END

7 Example 3 Draw a flowchart for program Find the difference and the division of two numbers and display the result.

8 START READ N1 , N2 D=N1-N2 V=N1/N2 PRINT D , V STOP

9 Example 4 Draw a flowchart for program Print the first 10 natural number

10 start N=1 Print N N=N+1 yes while N <= 10 no END

11 Example 6 Draw a flowchart for program Calculate the student grade ( A,B,C,D,F)

12 start Read Grade Grade >=90 yes no Grade >=80 yes no
Print A yes no Grade >=80 Print B yes no Grade >=70 yes Print C no Grade >=60 yes Print D no Print F END

13 Example 7 Draw a flowchart for program read temperature , If temp > 0 print above freezing else below freezing

14 start Read Temp yes Temp >0 no End Print“above freezing”
Print“below freezing” End

15 Example 8 Draw a flowchart for program read (10) marks for (20) students, then print the average for each student.

16 While studentCount <20 no
START studentCount=0 markCount=0 sUM=0 , avg=0 While studentCount <20 no yes STOP While markCount<10 no avg=sUM/10 yes PRINT avg READ x Increment studentCount sUM=sUM+x Increment markCount avg=0 , sUM=0 markCount=0


Download ppt "Flowchart Tutorial."

Similar presentations


Ads by Google