निम्नलिखित स्यूडोकोड का आउटपुट क्या होगा?
What will be the output of the following pseudocode ?
Integer a, b
Set a = 9, b = 5
a = a mod (a - 3)
b = b mod (b – 3)
Print a + b A
4
B
5
C
9
D
8
Explanation
Sure!
a = 9 mod (9 - 3) = 9 mod 6 = 3b = 5 mod (5 - 3) = 5 mod 2 = 1- So,
a + b = 3 + 1 = 4.
Answer: (A) 4.
Correct Answer: B) 5