Question PSC-COND-0021
EasyWhat is the output of this pseudocode?
Integer a = 15
if (a mod 3 == 0 and a mod 5 == 0)
Print "FizzBuzz"
else if (a mod 3 == 0)
Print "Fizz"
else if (a mod 5 == 0)
Print "Buzz"
else
Print a
end if
- A.
FizzBuzz
- B.
Fizz
- C.
Show answer and explanation
Answer: A
15 is divisible by both 3 and 5, so the first branch runs.