Program ricerca(input,output); Type vet=array[1..100] of integer; Var v,l:vet; Var t,g,i,x,b:integer; Var verit:boolean; Var a:real; Function mth$random(var b:integer):real;external; Procedure assegna; Begin b:=clock; For i:=1 to 100 do Begin a:=mth$random(b); v[i]:=trunc(a*100+1); end; end; Procedure ins; Begin Writeln('quale numero vuoi cercare?(un valore compreso tra 1 e 100)'); Readln(t); end; Procedure visua; Var y:integer; Begin For i:=1 to 100 do Begin If verit=true then Begin If l[i]=1 then Writeln('il numero è stato trovato nella posizione: ',i); end; end; if verit=false then Writeln('il numero non è stato trovato'); End; Procedure cerca; Begin verit:=false; For i:=1 to 100 do begin if t=v[i] then Begin verit:=true; l[i]:=1; end; end; End; Procedure prova; Begin For i:=1 to 100 do writeln(v[i]); End; Begin g:=100; assegna; prova; ins; cerca; visua; Writeln(' '); Writeln(' '); Writeln('Il programma è stato realizzato da Montanaro Teodoro e Massaro Alessio'); end.