Program ricercabinaria(input,output); Type vet=array[1..100] of integer; Var max:integer; n,b:integer; trov:boolean; v:vet; a:real; Function mth$random( var b:integer ):real;external; Procedure acqui; var i:integer; Begin b:=clock; For i:=1 to max do Begin a:=mth$random(b); v[i]:=trunc(a*300+1); end; end; Procedure scambia(var a,b:integer); Var supporto:integer; Begin supporto:=a; a:=b; b:=supporto; End; Procedure Ordina; var i,j:integer; Begin For i:=1 to max-1 do For j:=i+1 to max do If v[i]>v[j] then scambia(v[i],v[j]) end; Procedure chiedivet; Begin Writeln('quale numero vuoi cercare?(u valore compreso tra 1 e 300)'); Readln(n); end; Procedure ricercavet; Var sx,dx,md:integer; Begin trov:=false; sx:=1; dx:=max; While (trov=false) and (dx>=sx) do Begin md:=(sx+dx) div 2; If (n=v[sx]) or (n=v[dx]) or (n=v[md]) then trov:=true else if md