what will be the output of the following pseudo code? Set fun = 6 Set goal = 9…

PYQ Infosys Hiring Test 2024

what will be the output of the following pseudo code?

Set fun = 6

Set goal = 9

Set sum1 = 0

Set n = 2

if (goal is greater than fun):

for(n=f; n

sum1=sum1+n

else:

Write Error messages

Write sum1

  1. A.

    18

  2. B.

    15

  3. C.

    10

  4. D.

    2

Attempted by 43 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…