Untitled
unknown
plain_text
2 years ago
660 B
10
Indexable
program DrawNumber8;
var
Width, Height, i, j: integer;
begin
// Введите параметры ширины и высоты
Write('Введите ширину: ');
ReadLn(Width);
Write('Введите высоту: ');
ReadLn(Height);
// Рисование цифры 8
for i := 1 to Height do
begin
for j := 1 to Width do
begin
if ((i = 1) or (i = Height)) and ((j > 1) and (j < Width - 1)) or
((i > 1) and (i < Height) and ((j = 1) or (j = Width))) or
((i = Height div 2 + 1) and (j > 1) and (j < Width)) then
Write('*')
else
Write(' ');
end;
Writeln;
end;
ReadLn;
end.Editor is loading...
Leave a Comment