109
Se consideră algoritmul algo(n), unde n este un număr natural ().
Algoritm 1
Algorithm algo(n)
a ← 0; b ← False
While n > 0 execute
c ← n MOD 10
If c MOD 2 = 0 then
a ← a + c; b ← True
EndIf
n ← n DIV 10
EndWhile
If NOT b then Return −1
Else Return a EndIf
EndAlgorithmCe va returna apelul algo(6356)?
43 / 60