const n=10; var p:array[1..n]of byte; i,a:byte; begin Randomize; for i:=1 to n do p[i]:=random(10); for i:=1 to n do write(p[i],' '); writeln; write('a= '); readln(a); for i:=1 to n do if p[i]=a then writeln(i); readln; end.
Яндекс