निम्नलिखित स्यूडोकोड का आउटपुट क्या होगा?
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)
B)
C)
D)
Explanation:
Sure!
a = 9 mod (9 - 3) = 9 mod 6 = 3
b = 5 mod (5 - 3) = 5 mod 2 = 1
- So,
a + b = 3 + 1 = 4
.
Answer: (A) 4.