pascal问题急求,把空的补全
输入n个0到100之间的整数,由小到大排序输出,每行输出8个程序清单:programchu7_5;vari,j,k,n,x:integer;b:array[0..100]...
输入n个0到100之间的整数,由小到大排序输出,每行输出8个
程序清单:
program chu7_5;
var i,j,k,n,x:integer;
b:array[0..100]of integer;
begin
readln(n);
for i:=0 to 100 do b[i]:=0;
for i:=1 to n do
begin
readln(x);
b[x]:= ①
end;
②
for i:=0 to 100 do
while ③ do
begin
write( ④ );
k:=k+1;
b[i]:=b[i]-1;
if ⑤ then writeln
end;
readln;
end. 展开
程序清单:
program chu7_5;
var i,j,k,n,x:integer;
b:array[0..100]of integer;
begin
readln(n);
for i:=0 to 100 do b[i]:=0;
for i:=1 to n do
begin
readln(x);
b[x]:= ①
end;
②
for i:=0 to 100 do
while ③ do
begin
write( ④ );
k:=k+1;
b[i]:=b[i]-1;
if ⑤ then writeln
end;
readln;
end. 展开
展开全部
program chu7_5;
var i,j,k,n,x:integer;
b:array[0..100]of integer;
begin
readln(n);
for i:=0 to 100 do b[i]:=0;
for i:=1 to n do
begin
readln(x);
b[x]:=b[x]+1;
end;
writeln('After sort:'); //这一句搞不懂要求做什么?
for i:=0 to 100 do
while b[i]>0 do
begin
write(i:6);
k:=k+1;
b[i]:=b[i]-1;
if k mod 8=0 then writeln
end;
readln;
end.
var i,j,k,n,x:integer;
b:array[0..100]of integer;
begin
readln(n);
for i:=0 to 100 do b[i]:=0;
for i:=1 to n do
begin
readln(x);
b[x]:=b[x]+1;
end;
writeln('After sort:'); //这一句搞不懂要求做什么?
for i:=0 to 100 do
while b[i]>0 do
begin
write(i:6);
k:=k+1;
b[i]:=b[i]-1;
if k mod 8=0 then writeln
end;
readln;
end.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询