Variant 1
var
A: array[1..100] of integer;
N, i, j: byte;
begin
write('N = ');
readln(N);
for i := 1 to N do
write('a[', i, '] = ');
read(a[i])
end;
writeln;
for i := 2 to N do
for j := 1 to i - 1 do
if a[i] = a[j] then begin
writeln('Номера: ', j, ' и ', i);
exit
writeln
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Variant 1
var
A: array[1..100] of integer;
N, i, j: byte;
begin
write('N = ');
readln(N);
for i := 1 to N do
begin
write('a[', i, '] = ');
read(a[i])
end;
writeln;
for i := 2 to N do
for j := 1 to i - 1 do
if a[i] = a[j] then begin
writeln('Номера: ', j, ' и ', i);
exit
end;
writeln
end.