Q6 — Software Engineering

Q6

#0000081414

6 / 48

The following flowchart represents an algorithm.

A flowchart. The process begins with J equals 2. Next, is a decision block labeled K less than 40. If yes, the flow proceeds to an operation block labeled J equals J plus 2. This leads to the final operation block labeled J equals J plus K. If the condition K less than 40 is no, the flow goes directly to the final operation block labeled J equals J plus K. The process then exits.

Which of the given structured programming segments correctly translates the algorithm?