In finding maximum number of 3 different numbers, how many decision box will be drawn in the flow chart
Answers
Answer:- This will need 3 decision boxes.
Let us consider 3 numbers as A, B & C.
Check if (A > B) --1st decision box
{
If (A > C) -- 2nd decision box
{ A is maximum}
Else
{C is maximum}
}
Else
{
If (B > C) -- 3rd decision box
{ B is maximum}
Else
{C is maximum}
}
In finding maximum number of 3 different numbers, 2 decision box will be drawn in the flow chart.
Short note on Flowchart:
(i) It is a type of diagram that shows the steps in a process. It uses different shapes to represent the type of actions in a process.
(ii) The decision symbol in flowchart symbolizes the decision to be made.It can have two or three exit points.generally,it indicates a question to be answered - yes/no.
Advantages of flowchart:
(i) Effective Analysis/Efficient Coding.
(ii) Provides an easy way of communication
(iii) Proper debugging
(iv) Facilitates Troubleshooting.
∴ For the better understanding, i am explaining it with an algorithm.
Algorithm for finding maximum number of 3 numbers:
Start
Read 3 numbers Say A,B,C
Max = A
IF B > MAX THEN
MAX = B
ENDIF
IF C > MAX THEN
MAX = C
ENDIF
PRINT MAX
STOP.
Hope it helps!