Algorith M& Flowchar T
Algorith M& Flowchar T
ALGORITH
M&
FLOWCHAR
T
</ALGORITHM>
● An Algorithm is an important tool that is used to give the solution to a problem in step by step manner
/DEFINITION
/CHARACTERISTICS
Copyright
©austinmakasare22@gmail.com
</PROPERTIES OF ALGORITHM>
4. INPUT : The algorithm must accept zero or more quantities, which are
externally supplied.
Copyright
©austinmakasare22@gmail.com
</EXAMPLE OF ALGORITHM>
> Calculate the area of a circle > To check if a number is positive
by taking radius input or negative
Step 1: Start.
Step 1: Start
Step 2: Input value of radius.
Step 2: input number
Step 3: Calculate area using formula
Step 3: If number < 0 then
area = 3.142 x radius x radius
Display “Number is negative”
Step 4: Display value of area
Else
Step 5: Stop Display “Number is positive”
Step 4: Stop
Copyright ©austinmakasare22@gmai
</EXAMPLE>
>To find sum of first N positive
numbers, i.e,1+2+3+……+N.
Step 6: increment value of num by 1.
Step 1: Start
Step 7: add num to sum and store result in sum,
i.e sum = sum + num
Step 2: Input value of N
Step 8: If Num < = N, then Go
Step 3: Assign 0 to sum
to step 6
Step 4: assign 1 to sum
Step 9: Display value of sum
Step 5: Add num to sum and store
Step 10: stop
result in sum
i.e sum = sum + num
Copyright
©austinmakasare22@gmail.com
</FLOWCHART>
An algorithm is a written form of the solution to a problem. However , it can get very lengthy and Complicated. A
flowchart is a diagrammatic way of specifying the solution. It is a program Design tool in which standard graphical
symbols are used to represent the logical flow of data.
/DEFINITION
/CHARACTERISTICS
Copyright
©austinmakasare22@gmail.com
</FLOWCHART SYMBOLS>
Terminal
Decision
Indicates an input or
output task Shows direction of flow
Input/Output
Flow lines
Contains Arithmetic or
Assignment task Used for calling an
external module
Process
Module call
Copyright
©austinmakasare22@gmail.com
</FLOWCHART SYMBOLS>
Connector
__________
| |
Indicates a block of
| |
statements
| |
| __________|
Multiway selection
Copyright
©austinmakasare22@gmail.com
</EXAMPLES OF FLOWCHART>
> flowchart to check if a number is even or
> flow chart to calculate area of circle
odd
START
START
Read num
INPUT RADIUS
Is
Area = 3.142 x radius x radius Num % 2 = 0
Display num
DISPLAY is odd
Display num
is even
STOP
STOP
Copyright
©austinmakasare22@gmail.com
</DIFFERENCE BETWEEN>
Copyright
©austinmakasare22@gmail.com