Module 3 - 2 Flowchart
Module 3 - 2 Flowchart
Computer Programming
FLOWCHART
Flow Charts
Algorithm for large problems becomes complex
and thereby difficult to write the code. Problem
analysts found ‘Flow charts’
Read a
Here ‘a’ is the variable where the value of
Input is stored
Writing Expressions in
Computer Language
2. To produce output :
The following symbol is used to print one or
more outputs.
Print a
Read a,b
c=a+b
Stop
Read a, b
Yes No
Is a < b
Print a Print ab
Stop
Examples:
Flow Charts
2. Fahrenheit Scale Start
Convert into Celsius
Scale Read FARH
Solution:
Formula: C = (F-32)/1.8 CENTI = (FARH-32) / 1.8
where F is Fahrenheit
value and C is Celsius Print CENTI
value.
Stop
Examples:
Flow Charts
3. Draw a flowchart calculating
the area of a triangle with the
length of the three sides as a, b,
c, given by A=where s is the
semi-perimeter of the triangle,.
The perimeter of the triangle is
given by P = a+b+c.
Examples:
Flow Charts
4. Write a flowchart to
add natural numbers
from 1 to 50
Examples:
Flow Charts
Start
Read N
Sum = Sum + A
No Is count
A =A + 1 A = N?
Print Sum
Stop