Cho thuật toán: Procedure Test(x,i,j: Integer); Var m:integer; Begin m:=trunc(i+j)/2; If x= a[i] then vt:=m Else If (x < a[m] ) and (i a[m] ) and (j>m) then Test(x,m+1,j) Else vt:=0; End; Vớ
24/30
Cho thuật toán:
Procedure Test(x,i,j: Integer);
Var m:integer;
Begin
m:=trunc(i+j)/2;
If x= a[i] then vt:=m
Else If (x < a[m] ) and (i
Else If (x > a[m] ) and (j>m) then Test(x,m+1,j)
Else vt:=0;
End;
Với A = {5, 2, 9 ,8, 6, 4, 7,1}. Kết quả nào đúng trong số những kết quả dưới đây: