Ответ:
var n,k,l,i,j:integer;
begin
write ('n = ');
read (n);
k:=1;
l:=5;
for j:=1 to n div 5 do
for i:=k to l do
if i=l then write (i)
else write (i,',');
writeln;
k:=l+1;
l:=l+5
end;
for i:=k to n-1 do
if i=n-1 then write (i)
else write (i,',')
end.
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
var n,k,l,i,j:integer;
begin
write ('n = ');
read (n);
k:=1;
l:=5;
for j:=1 to n div 5 do
begin
for i:=k to l do
if i=l then write (i)
else write (i,',');
writeln;
k:=l+1;
l:=l+5
end;
for i:=k to n-1 do
if i=n-1 then write (i)
else write (i,',')
end.