In c language programming flowchart.pptx

b221382 35 views 16 slides Sep 22, 2024
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

C language


Slide Content

Programming For Problem Solving “Flowchart” 1

2 INTRODUCTI O N Flowchart is a diagrammatic representation of an algorithm. Flowchart is very helpful in writing program and explaining program to others. Different symbols are used for different states in flowchart, For example: Input/output and decision making has different symbols. The table below describes all the symbols that are used in making flowchart.

SYMBOLS USED IN FLOWCHART 3

Draw a flowchart to calculate sum of three numbers 4 S T OP START A = 10 B = 20 C=30 Sum=A+B+C Sum

Method-II Draw a flowchart to calculate sum of three numbers Write Sum STOP START Read A,B,C Su m=A + B+C 5

The conditional statement is written in a flowchart as shown. Statements Statements S T OP 6 F ALSE Condition TR U E

Draw a flow chart to find maximum of two numbers. A > B Read A,B S T A R T MAX B MAX A S T OP 7 T R UE F ALSE

Draw a flow chart to check a numbers is EVEN or ODD. START ODD EVEN S T OP 8 T R UE Read N F ALSE N%2==0

Draw a flow chart to check a numbers is POSITIVE or NEGATIVE. START N e g a ti v e P ositi v e S T OP 9 T R UE Read N F ALSE N>0

Draw a flow chart to find maximum among three numbers. 10

The looping statements are written in a flowchart as shown. Statements Statements S T OP 11 T R UE F ALSE CONDITION

Draw a flow chart to calculate sum of N numbers. S T OP S T A R T Read N s u m=0 i = sum = sum + x i = i+1 FALSE i <=N TRUE Write sum Read x 12

S T OP Draw a flow chart to calculate sum of first 10 Numbers. START Read N s u m=0 i = sum = sum + x i = i+1 FALSE i <=N TRUE Write sum 13

Draw a flow chart to calculate sum of EVEN Numbers from 1 to N. S T OP T R UE S T A R T Read N s u m=0 i = 1 Write sum sum = sum + i F A LSE i <=N FALSE i%2==0 T R U E i = i+1 14

Draw a flow chart to calculate sum of ODD Numbers from 1 to N. S T OP T R UE S T A R T Read N s u m=0 i = 1 Write sum sum = sum + i F A LSE i <=N FALSE i%2 !=0 T R U E i = i+1 15

Thank You 16