A
UBB · Informatică
118

Se consideră algoritmul Algo(x, y), unde x și y sunt numere naturale.

Algoritm 1

Algorithm Algo(x, y)
  a ← x; b ← y
  If a = 0 OR b = 0 then a ← a ∗ b
  Else
    While a ≠ b execute
      If a < b then a ← a + x
      Else b ← b + y EndIf
    EndWhile
  EndIf
  Write a
EndAlgorithm

Precizați care dintre următoarele afirmații sunt corecte:

52 / 60