Algorithm & Flowchart
Algorithm & Flowchart
1.Start
2.Input
L,M,N,A=0
3. A=(L+M+N)/3
4.Output A
5.Stop
Decision Box
I/P
NO YES
ELSE CONDITION
THEN
O/P O/P
Greatest of
two
numbers.(a
& b)
Greatest of two numbers.(a &
b)
1.START
2.INPUT a & b
3.IF a>b THEN OUTPUT a IS
GREATEST
4.STOP
To find whether the given number(N) is
even or odd
1.Start
2.Input N
3.If N % 2 = 0 Then Output N is
even
Else Output N is odd
4.Stop
1. Write an algorithm &
draw a flowchart for division
of two numbers (A & B)in
such a way that , the greater
number should be in the
numerator & smaller in the
denominator.(O/P will be
stored in X)
1.Start
2.Input A , B ,X=0
Else X=B/A
4.O/P X
5. Stop
Q. Write an algorithm
& draw a flowchart to
find whether the given
number(N) is positive ,
negative or zero.
1.Start
2.Input N
3.If N>0 Then O/P N is
positive
Else If N = 0 Then o/p N is
equal to zero
Else o/p N is Negative
5. Stop
Q. Write an
algorithm & draw a
flowchart to find
whether A>B or B>A
or A=B