По идее работает правильно:
program basketbol;
var a:array[1..12] of integer;
i,c,g:integer;
begin
g:=0;
for i:=1 to 12 do
readln(a[i]);
if a[i] > c then c:=a[i];
writeln();
if a[i] = c then g:=g+1;
for i:=1 to g do writeln(c);
for i:=1 to 12 do begin
if a[i] <> c then writeln(a[i]);
end;
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
По идее работает правильно:
program basketbol;
var a:array[1..12] of integer;
i,c,g:integer;
begin
g:=0;
for i:=1 to 12 do
readln(a[i]);
for i:=1 to 12 do
if a[i] > c then c:=a[i];
writeln();
for i:=1 to 12 do
if a[i] = c then g:=g+1;
for i:=1 to g do writeln(c);
for i:=1 to 12 do begin
if a[i] <> c then writeln(a[i]);
end;
end.