Se consideră algoritmul compute(n), unde n este număr natural (1 < n ≤ 104).
Algorithm compute(n):
x ← 0
While n > 0 execute
If n MOD 2 = 1 then
x ← x + 1
EndIf
n ← n DIV 2
EndWhile
Return x
EndAlgorithmCare dintre următoarele afirmații sunt adevărate?
Alegeți toate variantele corecte.