Understand the flowchart and answer the question.

Grade two Algorithmic Question One

What is the output of the flowchart?  

A. 0
B. 1
C. 2

Answer: (B)

Solution: 
According to the given flowchart,

 X = 2, Y = 3 and 

3Y + 4X – X = A

9X ÷ Y – Y = B

To find the values of A and B put the x and y values in the given equations:

A = 3 x 3 + 4 x 2 – 2

A = 15

And for B,

B = 9 x 2 ÷ 3 – 3

B = 3

Now If we compare the values of A and B then we can say  A > B. 

According to the given conditions in a flowchart if A > B then output show 1.

Therefore, the correct answer is 1.