Question 20 of 110Programming Basicspseudocode

Consider the following pseudocode carefully and trace its execution step by step. What will be printed when this pseudocode is executed?

Integer n = 7326, tally = 0
While n > 0
    d = n mod 10
    If d mod 3 == 0 then
        tally = tally + 1
    End If
    n = n / 10 (integer division)
End While
Print tally

The verified answer and full solution are one login away

Every answer here is machine verified, with a step-by-step solution that teaches the method. Your login also unlocks a 7-question mock preview in the real exam interface.

Log in to see the answer
← Q19Q21Attempt the full timed mock

More pseudocode questions