Accenture | Pseudocode Questions | Question 10

    Last Updated :
    Discuss
    Comments

    Calculate the output of the following pseudocode.

    Integer w, x, y, z
    Set w = 21, x = 11
    for (each y from 21 to 30 )
               for (each z from -1 to 0 )
                       w = w - 1
                       if(w > y)
                              Continue 
                       End if 
                       w = 1
                       if(w > z) 
                              Jump out of the loop 
                       End if 
               End for 
    End for 
    Print w + x

    8

    12

    3

    2

    Share your thoughts in the comments